CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 23

Thread: __cplusplus number

Threaded View

  1. #1
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,751

    __cplusplus number

    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

    [Edit...] FWIW if I add the line:- long my_test = __cplusplus; to some module, the returned value seems to be 199711
    Last edited by John E; May 3rd, 2021 at 03:55 AM.
    "A problem well stated is a problem half solved. - Charles F. Kettering

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)