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

__cplusplus number

$
0
0
I'm involved in a project written for gcc (although I build with VS2019). Recently, someone added a section like this:-

Code:

# if (defined(__cplusplus) &&  __cplusplus >= 201709L)
      // Some functionality
# emdif

Even in VS2019, Intellisense removes that code section - so I did some digging and realised that in Properties->General my C++ Language Standard was set to the default (ISO C++14 Standard). So I tried the various alternatives but nothing makes that section appear. Is there some other setting I need to change? I'm assuming that for VS2019 the value of __cplusplus should be higher than 201709 :confused:

[Edit...] FWIW if I add the line:- long my_test = __cplusplus; to some module, the returned value seems to be 199711

Viewing all articles
Browse latest Browse all 3029

Latest Images

Trending Articles



Latest Images