Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3042

Identifying the compiler language

$
0
0
I'm not talking about compilers, like MSVC or Clang etc - but within Visual Studio I can select C++14 or 17 or 20 etc. But C++14 offered features which got abandoned later (such as std::auto_ptr) and of course the later versions offer new features which weren't in C++14. So is there some way I can identify the language at compile time? Something like...

Code:

#if (I_SELECTED_C++17_OR_HIGHER)
    // Build a small code section using the newer features
#else
    // Carry on building it the old way
#endif
}


Viewing all articles
Browse latest Browse all 3042

Trending Articles