I have a simple call to std::setenv, which works fine on my Linux distribution under gcc. However, when using clang on my Mac OS X, I get the following error.
error: no member named 'setenv' in namespace 'std'; did you mean simply 'setenv'?
std::setenv(name.c_str(), value.c_str(), true);
I'm sure, I've read somewhere that setenv was part of namespace std in C++11, but now I'm unsure.
Question: Should setenv or std::setenv be used, and why is this the case?