error: no member named 'nullptr_t' in the global namespace

clang++ compilation appears to be completely broken under the latest version of macos Ventura (13.3)/Xcode (14.3)/CommandLineTools/MacOsX.sdk (13.3)

This is easy to reproduce. Here's the simplest example I can come up with:

Create a file named Test.cpp with the following contents:

#include <cstddef>

int main() {
    return 0;
}

Try to compile it with the following command on a command line in Terminal.app window

clang++ -std=c++17 -stdlib=libc++ -g -c -o Test.o Test.cpp

This should compile successfully and create the file Test.o, but instead it generates an error that appears to come from bug(s) within the SDK (Entire error response shown below)

Error response:

In file included from Test.cpp:4:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:52:9: error: no member named 'nullptr_t' in the global namespace
using ::nullptr_t;
      ~~^
1 error generated.

Unfortunately the error seems to occur early in the include chain of many headers. For example if instead of

#include <cstddef> 

you use

#include <vector>

or

#include <list>

the number of errors returned increases dramatically. This has had the effect of derailing almost ALL of my C++ compilation on the latest version of Ventura -- a major problem for me, since I (and presumably many others) develop on the mac for a living.

There are similar questions already posted on Stack Overflow / Stack Exchange:

https://stackoverflow.com/questions/75921280/updating-to-macos-13-3-broke-compiling-cpp

https://apple.stackexchange.com/questions/458062/unable-to-find-include-file-on-newly-updated-macosc-c/459037

I have also submitted the issue to Apple through the Feedback tool though I'm not sure this link is publicly viewable:

https://feedbackassistant.apple.com/feedback/12156695

A possible hint: Other internet research indicates that this problem may not occur when using Xcode to compile. I do not use Xcode, Visual Studio or any other IDE, so I haven't tested this. (I've always found it much quicker to operate "closer to the metal" with the command line and basic makefiles, so I haven't learned the IDEs.)

I'd love it if anyone has any insights into how to fix this bug that has seemingly broken C++ development in the latest macos release.

Thanks!

Dave

Lumieria

Post not yet marked as solved Up vote post of supertwang Down vote post of supertwang
4.1k views

Replies

Is this Intel? Or Apple silicon? Or both?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

@eskimo,

This is happening on both an M1 Mac Studio and an M2 Mac Mini.

Also has this trouble while using folly(https://github.com/facebook/folly) or mvfst(using folly inside)(https://github.com/facebookincubator/mvfst).

I needed to update my Apple silicon ‘victim’ Mac anyway, so I thought I’d try this out.

When I started, my Mac was running macOS 13.2 with the Xcode 14.2 command line tools installed and selected:

% sw_vers
ProductName:		macOS
ProductVersion:		13.2
BuildVersion:		22D49
% pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
…
% xcode-select -p
/Library/Developer/CommandLineTools

Your simple C++ program builds just fine:

% cat Test.cpp 
#include <cstddef>

int main() {
    return 0;
}
% clang++ -std=c++17 -stdlib=libc++ -g -c -o Test.o Test.cpp
% 

I then updated. Specifically, in System Settings > General > Software Update there were two items listed:

  • macOS Ventura 13.3.1
  • Command Line Tools for Xcode 14.3

I installed them both, resulting in:

% sw_vers
ProductName:		macOS
ProductVersion:		13.3.1
BuildVersion:		22E261
% pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 14.3.0.0.1.1679647830
…
% xcode-select -p
/Library/Developer/CommandLineTools

I then re-ran your basic C++ test:

% clang++ -std=c++17 -stdlib=libc++ -g -c -o Test.o Test.cpp
% 

I’m not sure why this is failing in your environment. Some points:

  • Have you disabled SIP?

    % csrutil status
    System Integrity Protection status: enabled.
    
  • What does pkgutil report?

  • Make sure that your command-line tools are selected. If not, run xcode-select with the -s option to select them.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I really appreciate you giving this a try @eskimo!

Following your instructions...

  1. I saw that 13.3.1 came out, and installed that update.

Here are the results from the queries you recommended:

% sw_vers
ProductName:		macOS
ProductVersion:		13.3.1
ProductVersionExtra:	(a)
BuildVersion:		22E772610a

and

% xcode-select -p
/Applications/Xcode.app/Contents/Developer

Interesting that it is pointed somewhere different than your own. Which is 'Correct?' In the end it doesn't affect the problem. I did the following

% xcode-select -s /Library/Developer/CommandLineTools
% xcode-select -p
/Library/Developer/CommandLineTools

But still got the same errors upon compilation.

% csrutil status
System Integrity Protection status: enabled.

and

% pkgutil --pkgs
com.apple.pkg.CLTools_SDK_macOS13
com.apple.pkg.XProtectPayloads_10_15.16U4239
com.apple.pkg.XProtectPayloads_10_15.16U4238
com.apple.pkg.CLTools_SDK_macOS12
com.apple.pkg.MAContent10_AssetPack_0637_AppleLoopsDrummerKyle
com.apple.pkg.MAContent10_AssetPack_0593_DrummerSoCalGBLogic
com.apple.pkg.CLTools_Executables
com.apple.files.data-template
com.apple.pkg.CoreTypes.1600A30
com.apple.pkg.XProtectPlistConfigData_10_15.16U4233
com.apple.pkg.MobileAssets
com.apple.pkg.MAContent10_AssetPack_0317_AppleLoopsModernRnB1
com.apple.pkg.MAContent10_AssetPack_0537_DrummerShaker
com.apple.pkg.MAContent10_AssetPack_0482_EXS_OrchWoodwindAltoSax
com.apple.pkg.MAContent10_AssetPack_0048_AlchemyPadsDigitalHolyGhost
com.apple.pkg.XProtectPlistConfigData_10_15.16U4247
com.apple.pkg.MAContent10_AssetPack_0539_DrummerTambourine
com.apple.pkg.MAContent10_AssetPack_0323_AppleLoopsVintageBreaks
com.apple.pkg.MAContent10_AssetPack_0487_EXS_OrchWoodwindFluteSolo
com.apple.pkg.MAContent10_AssetPack_0557_IRsSharedAUX
com.apple.pkg.MAContent10_AssetPack_0484_EXS_OrchWoodwindClarinetSolo
com.apple.pkg.MRTConfigData_10_15.16U4211
com.apple.pkg.XProtectPayloads_10_15.16U4248
com.apple.pkg.MAContent10_AssetPack_0310_UB_DrumMachineDesignerGB
com.apple.pkg.MAContent10_AssetPack_0316_AppleLoopsDubstep1
com.apple.pkg.XProtectPlistConfigData_10_15.16U4241
com.apple.pkg.MAContent10_AssetPack_0491_EXS_OrchBrass
com.apple.pkg.MAContent10_AssetPack_0560_LTPBasicPiano1
com.apple.pkg.MAContent10_AssetPack_0315_AppleLoopsElectroHouse1
com.apple.pkg.MAContent10_AssetPack_0322_AppleLoopsDiscoFunk1
com.apple.pkg.MAContent10_AssetPack_0597_LTPChordTrainer
com.apple.pkg.MAContent10_AssetPack_0540_PlugInSettingsGB
com.apple.pkg.MAContent10_AssetPack_0375_EXS_GuitarsVintageStrat
com.apple.pkg.XProtectPayloads_10_15.16U4246
com.apple.pkg.MAContent10_AssetPack_0806_PlugInSettingsGBLogic
com.apple.pkg.XProtectPayloads_10_15.16U4244
com.apple.pkg.MAContent10_AssetPack_0615_GBLogicAlchemyEssentials
com.apple.pkg.MAContent10_AssetPack_0509_EXS_StringsEnsemble
com.apple.pkg.MAContent10_AssetPack_0324_AppleLoopsBluesGarage
com.apple.pkg.MAContent10_AssetPack_0314_AppleLoopsHipHop1
com.apple.pkg.RosettaUpdateAuto
com.apple.pkg.MAContent10_AssetPack_0325_AppleLoopsGarageBand1
com.apple.pkg.MAContent10_AssetPack_0371_EXS_GuitarsAcoustic
com.apple.pkg.MAContent10_AssetPack_0312_UB_UltrabeatKitsGBLogic
com.apple.pkg.MAContent10_AssetPack_0646_AppleLoopsDrummerElectronic
com.apple.pkg.MAContent10_AssetPack_0598_LTPBasicGuitar1
com.apple.pkg.XProtectPayloads_10_15.16U4242
com.apple.pkg.MAContent10_AssetPack_0354_EXS_PianoSteinway
com.apple.pkg.MAContent10_AssetPack_0321_AppleLoopsIndieDisco
com.apple.pkg.MAContent10_AssetPack_0538_DrummerSticks
com.apple.pkg.MAContent10_AssetPack_0358_EXS_BassElectricFingerStyle
com.apple.pkg.MobileDeviceDevelopment
com.apple.pkg.CLTools_SwiftBackDeploy
com.apple.pkg.XProtectPayloads_10_15.16U4232
com.apple.pkg.MAContent10_AssetPack_0554_AppleLoopsDiscoFunk2
com.apple.pkg.CLTools_macOS_SDK
com.apple.pkg.XcodeSystemResources
com.apple.pkg.MAContent10_AssetPack_0536_DrummerClapsCowbell
com.apple.pkg.XProtectPayloads_10_15.16U4237
com.apple.pkg.MAContent10_AssetPack_0357_EXS_BassAcousticUprightJazz
com.apple.pkg.MAContent10_AssetPack_0320_AppleLoopsChillwave1
com.apple.cdm.pkg.Pages_MASReceipt
org.nodejs.npm.pkg
com.logitech.manager.pkg
com.apple.pkg.Pages13
com.apple.cdm.pkg.Keynote_MASReceipt
com.apple.pkg.Pages12
com.ookla.speedtest-macos
org.python.Python.PythonDocumentation-2.7
com.apple.pkg.iMovie_AppStore
com.brother.iprint-and-scan
org.python.Python.PythonFramework-2.7
net.shinyfrog.image2icon
com.nordvpn.macos
com.apple.pkg.GarageBand_AppStore
com.apple.cdm.pkg.Numbers_MASReceipt
com.bitwarden.desktop
com.apple.pkg.Keynote13
com.apple.pkg.Keynote12
com.apple.cdm.pkg.GarageBand_MASReceipt
com.apple.pkg.LogicPro_AppStore
com.nordvpn.NordVPN
com.apple.pkg.Xcode
com.apple.cdm.pkg.iMovie_MASReceipt
org.nodejs.node.pkg
com.apple.pkg.Numbers12
com.toolsforgopro.CameraToolsForHeros
com.apple.pkg.Numbers13
org.python.Python.PythonApplications-2.7
com.apple.cdm.pkg.SetupMacOSRecoveryDependencies
org.macports.MacPorts
org.python.Python.PythonUnixTools-2.7
com.appersian.hiddenme
com.cloudflare.1dot1dot1dot1.macos
com.dcomplex.mac.nvrviewer2

My compile error remains the same:

% clang++ -std=c++17 -stdlib=libc++ -g -c -o Test.o Test.cpp
In file included from Test.cpp:4:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:52:9: error: no member named 'nullptr_t' in the global namespace
using ::nullptr_t;
      ~~^
1 error generated.

I'm wondering if this might be due to me using Migration Assistant when I upgraded to this machine in December.

I'm wondering if either of these is legacy/obsolete...


com.apple.pkg.CLTools_macOS_SDK
com.apple.pkg.CLTools_Executables

since it doesn't follow the naming convention of these?


com.apple.pkg.CLTools_SDK_macOS13
com.apple.pkg.CLTools_SDK_macOS12

But that is just an uninformed stab in the dark at best!

I am going to try and delete /Applications/Xcode and do a fresh install, just in case there's cruft in there somehow. Is there any way to completely wipe /Library/Developer and start over there?

Thanks again for your help.

  • Unfortunately, even after a full re-install of Xcode 14.3 and Command Line Tools for 14.3, the compilation problem persists. :(Here's my clang++ `% clang++ --version

    **Apple clang version 14.0.3 (clang-1403.0.22.14.1)

    Target: arm64-apple-darwin22.4.0

    Thread model: posix

    InstalledDir: /Library/Developer/CommandLineTools/usr/bin`**

Add a Comment

I FIGURED IT OUT! I began to suspect something might have been different in my shell environment than yours, and indeed that was the problem.

I had previously followed the workaround described here:

https://cmichel.io/fixing-cpp-compilation-bugs-for-the-mac-os-catalina-upgrade/

which involved setting an environment variable (in my bash .profile):


CPLUS_INCLUDE_PATH=/usr/local/opt/llvm/include/c++/v1:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include

Removing the CPLUS_INCLUDE_PATH environment variable fixed the problem and compilation works again!!!

Add a Comment

Interesting that it is pointed somewhere different than your own. Which is 'Correct?'

Both (-:

This setting controls the current developer directory. That’s where xcodebuild and other stuff, like xcrun, look for SDKs, tools, and so on. You can either:

  • Point it to a specific Xcode, in which case it’ll use the SDKs and tools from that directory,

  • Or point it to /Library/Developer/CommandLineTools, in which case it’ll use the current command-line tools package


I FIGURED IT OUT!

Yay!

Just for the benefit of other folks reading this thread, my next suggestion would have been Create a new user account and see if the problem replicates there. I’ve seen problems like this before and my experience is that a new user account is a great way to distinguish between a) your Xcode installation is borked, and b) you’re being hit by some weird configuration setting.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • Create a new user account - Great idea... I hadn't thought of that. I'm going to add that to my troubleshooting repertoire! Thanks also for the clarification on the xcode-select setting.

Add a Comment

Just for the benefit of other folks reading this thread, my next suggestion would have been Create a new user account and see if the problem replicates there.

And my suggestion is to run clang++ —verbose, and compare the output. It will generally reveal wrong paths, different versions, etc.

Also see such errors for version 13.3:

/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/cstddef:50:9: error: no member named 'nullptr_t' in the global namespace using ::nullptr_t;

There is no such error for my project for version 13.1

So I think for now it's suggested to just downgrade

I think for now it's suggested to just downgrade

No. The OP worked out that this was a problem with their setup. See this post. I expect that you are experiencing a similar problem (although probably not that exact problem). If a simple test program is failing to compile — see my test setup here — I recommend that you do what I suggested here, namely, test from a new user account. Or do what endecotp suggested here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi, I am having the same issue on my machine, and I've tried every solution I've found here, but none have worked. I reinstalled xCode and Command Line Tools and have searched for the CPLUS_INCLUDE_PATH variable everywhere. I have also migrated from an intel machine to apple silicon using migration assistant.

Using the same Test.cpp file that @supertwang provided, and clang++ -std=c++17 -stdlib=libc++ -g -c -o Test.o Test.cpp --verbose, here is the output:

Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
...
clang -cc1 version 14.0.3 (clang-1403.0.22.14.1) default target arm64-apple-darwin22.6.0
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1
 /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
 /Library/Developer/CommandLineTools/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)
End of search list.
In file included from Test.cpp:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:50:9: error: no member named 'nullptr_t' in the global namespace
using ::nullptr_t;
      ~~^
1 error generated.

I'm not sure what the 'ignoring nonexistent directory' outputs are about.

I have also run this using a new user account and the errors remained the same.

Here are the outputs of the commands @eskimo provided:

sw_vers
ProductName:		macOS
ProductVersion:		13.5
BuildVersion:		22G74
xcode-select -p
/Library/Developer/CommandLineTools
pkgutil --pkgs
com.apple.pkg.CLTools_SDK_macOS13
com.apple.pkg.CLTools_SDK_macOS12
com.apple.pkg.MAContent10_AssetPack_0637_AppleLoopsDrummerKyle
com.apple.pkg.MAContent10_AssetPack_0593_DrummerSoCalGBLogic
com.apple.pkg.CLTools_Executables
com.apple.files.data-template
com.apple.pkg.MobileAssets
com.apple.pkg.MAContent10_AssetPack_0317_AppleLoopsModernRnB1
com.apple.pkg.MAContent10_AssetPack_0537_DrummerShaker
com.apple.pkg.MAContent10_AssetPack_0482_EXS_OrchWoodwindAltoSax
com.apple.pkg.CoreTypes.1650A12
com.apple.pkg.MAContent10_AssetPack_0048_AlchemyPadsDigitalHolyGhost
com.apple.pkg.MAContent10_AssetPack_0539_DrummerTambourine
com.apple.pkg.MAContent10_AssetPack_0323_AppleLoopsVintageBreaks
com.apple.pkg.MAContent10_AssetPack_0487_EXS_OrchWoodwindFluteSolo
com.apple.pkg.MAContent10_AssetPack_0557_IRsSharedAUX
com.apple.pkg.MAContent10_AssetPack_0484_EXS_OrchWoodwindClarinetSolo
com.apple.pkg.MRTConfigData_10_15.16U4211
com.apple.pkg.XProtectPayloads_10_15.16U4260
com.apple.pkg.MAContent10_AssetPack_0310_UB_DrumMachineDesignerGB
com.apple.pkg.XProtectPlistConfigData_10_15.16U4254
com.apple.pkg.MAContent10_AssetPack_0316_AppleLoopsDubstep1
com.apple.pkg.MAContent10_AssetPack_0491_EXS_OrchBrass
com.apple.pkg.MAContent10_AssetPack_0560_LTPBasicPiano1
com.apple.pkg.MAContent10_AssetPack_0315_AppleLoopsElectroHouse1
com.apple.pkg.XProtectPlistConfigData_10_15.16U4256
com.apple.pkg.MAContent10_AssetPack_0322_AppleLoopsDiscoFunk1
com.apple.pkg.MAContent10_AssetPack_0597_LTPChordTrainer
com.apple.pkg.MAContent10_AssetPack_0540_PlugInSettingsGB
com.apple.pkg.MAContent10_AssetPack_0375_EXS_GuitarsVintageStrat
com.apple.pkg.MAContent10_AssetPack_0806_PlugInSettingsGBLogic
com.apple.pkg.MAContent10_AssetPack_0615_GBLogicAlchemyEssentials
com.apple.pkg.MAContent10_AssetPack_0509_EXS_StringsEnsemble
com.apple.pkg.MAContent10_AssetPack_0324_AppleLoopsBluesGarage
com.apple.pkg.MAContent10_AssetPack_0314_AppleLoopsHipHop1
com.apple.pkg.XProtectPayloads_10_15.16U4251
com.apple.pkg.RosettaUpdateAuto
com.apple.pkg.XProtectPayloads_10_15.16U4255
com.apple.pkg.MAContent10_AssetPack_0325_AppleLoopsGarageBand1
com.apple.pkg.MAContent10_AssetPack_0371_EXS_GuitarsAcoustic
com.apple.pkg.MAContent10_AssetPack_0312_UB_UltrabeatKitsGBLogic
com.apple.pkg.MAContent10_AssetPack_0646_AppleLoopsDrummerElectronic
com.apple.pkg.MAContent10_AssetPack_0598_LTPBasicGuitar1
com.apple.pkg.MAContent10_AssetPack_0354_EXS_PianoSteinway
com.apple.pkg.MAContent10_AssetPack_0321_AppleLoopsIndieDisco
com.apple.pkg.MAContent10_AssetPack_0538_DrummerSticks
com.apple.pkg.MAContent10_AssetPack_0358_EXS_BassElectricFingerStyle
com.apple.pkg.MobileDeviceDevelopment
com.apple.pkg.CLTools_SwiftBackDeploy
com.apple.pkg.MAContent10_AssetPack_0554_AppleLoopsDiscoFunk2
com.apple.pkg.CLTools_macOS_SDK
com.apple.pkg.MAContent10_AssetPack_0536_DrummerClapsCowbell
com.apple.pkg.MAContent10_AssetPack_0357_EXS_BassAcousticUprightJazz
com.apple.pkg.MAContent10_AssetPack_0320_AppleLoopsChillwave1
com.apple.cdm.pkg.Pages_MASReceipt
com.microsoft.Powerpoint
com.microsoft.rdc.macos
com.apple.pkg.Pages13
com.apple.cdm.pkg.Keynote_MASReceipt
com.apple.pkg.Pages12
com.apple.pkg.iMovie_AppStore
com.flexibits.fantastical2.mac
com.brave.Brave
com.apple.pkg.GarageBand_AppStore
com.microsoft.Word
com.apple.cdm.pkg.Numbers_MASReceipt
com.microsoft.teams
com.apple.pkg.Keynote13
com.apple.pkg.Keynote12
com.apple.cdm.pkg.GarageBand_MASReceipt
com.gingerlabs.Notability
me.damir.dropover-mac
com.apple.pkg.Xcode
com.readdle.smartemail-Mac
com.apple.cdm.pkg.iMovie_MASReceipt
us.zoom.pkg.videomeeting
com.apple.pkg.Numbers12
com.goodnotesapp.x
com.microsoft.Outlook
com.apple.cdm.pkg.SetupMacOSRecoveryDependencies
com.microsoft.Excel

I appreciate your time, thank you for your help in advance.

Well, that’s good timing. I’ve just collected my thoughts on this in Investigating Third-Party IDE Integration Problems.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for the quick reply ! I went through your post and have some more info.

Your C diagnostic test exampled compiled but it spewed out a ton of warnings, see some here:

clang -o hello hello.c
In file included from hello.c:1:
In file included from /usr/local/include/stdio.h:64:
/usr/local/include/_stdio.h:93:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
        unsigned char   *_base;
                        ^
/usr/local/include/_stdio.h:93:16: note: insert '_Nullable' if the pointer may be null
        unsigned char   *_base;
                        ^
                          _Nullable
/usr/local/include/_stdio.h:93:16: note: insert '_Nonnull' if the pointer should never be null
        unsigned char   *_base;
                        ^
                          _Nonnull
...
/usr/local/include/stdio.h:393:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
FILE    *funopen(const void *,
        ^
/usr/local/include/stdio.h:393:6: note: insert '_Nullable' if the pointer may be null
FILE    *funopen(const void *,
        ^
          _Nullable
/usr/local/include/stdio.h:393:6: note: insert '_Nonnull' if the pointer should never be null
FILE    *funopen(const void *,
        ^
          _Nonnull
13 warnings generated.

I am not sure if this is in any way related to the issue I was having with C++.

I ran the C++ test on a new macOS installation in a VM and it ran just fine.

I wanted to add that all of the issues that I have been facing are directly from clang, as I have exclusively been using my terminal while trying to solve this issue, no IDE.

I ran the test again on a separate user account and the issue persisted. I tried to cross reference environment variables between my main account, test account, and the vm, with no success, using both zsh and bash.

I am tempted to reinstall macOS completely as I believe this issue somehow stems from migration assistant.

I also ran into this issue, for some reason I had followed a Stackoverflow post suggesting the following: 'sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/'

Which caused the error: "no member named 'nullptr_t' in the global namespace"

Undoing that seemed to restore sanity.