Boost logo

Boost :

Subject: Re: [boost] [c++11] MSVC does not define __cplusplus?
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2015-02-07 09:23:55

On Sat, Feb 7, 2015 at 12:47 AM, Oliver Kowalke <oliver.kowalke_at_[hidden]>

> Hi,
> I encountered that '__cplusplus < 201103L' evaluates on MSVC (14.0 ...) to
> true?!
> At least on GCC + CLANG this test works - what about MSVC?

Compilers tend to define that when they think they are fully compliant with
a particular version of the standard. Even if you invoke them in the latest
standards modes. You can see that from the Predef test results <>. For
example VS 2015 defines it as:

BOOST_LANG_STDCPP = 271100001 (27,11,1) | Standard C++

Which is still C++98. And some of the compilers that define it for C++11
define it at various month times in the year (some January some March). And
some, like Intel, just define at 1.

-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams -
-- rrivera/ (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

Boost list run by bdawes at, gregod at, cpdaniel at, john at