Boost logo

Boost :

Subject: [boost] [config] MSVC feature-test macros
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2018-06-27 20:21:03


Hi Boost devs,

FYI, VS 2017 15.8 Preview 3 has been released, with support for feature-test macros. If you want to take advantage of the feature-test macros, please notify me immediately about any problems so I can get them fixed for the production release. Notes:

* __has_cpp_attribute is the one thing that isn't supported yet.

* There are minor changes coming for the production release of 15.8, notably L suffixing and an increase in the value for __cpp_deduction_guides.

* Library macros are defined by including any <meow> or <cmeow> header (but not <meow.h>). <ciso646> is the lightweight way to get all macros. This will be superseded by <version> in C++20, but that is not yet implemented.

* The macros are always provided regardless of the /std compiler option. (Of course their definedness and values vary.)

* We are defining __cpp_exceptions and __cpp_rtti, although those weren't picked up for C++20.

* The only fundamentally new ability that these macros provide is the ability to sense whether thread-safe statics are supported; this was previously controlled by a compiler option, but not reflected in any MSVC-specific macro.

* The macros respect all of our compiler options and library control macros - e.g. if std::byte's definition is suppressed (to avoid conflicts with the Windows SDK), then __cpp_lib_byte reflects that.

Hope this helps,
STL


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk