|
Boost : |
Subject: Re: [boost] [c++11] MSVC does not define __cplusplus?
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-02-07 11:13:29
On 7 Feb 2015 at 7:47, Oliver Kowalke wrote:
> I encountered that '__cplusplus < 201103L' evaluates on MSVC (14.0 ...) to
> true?!
> At least on GCC + CLANG this test works - what about MSVC?
__cplusplus is fairly useless except for detecting a C++ compiler.
You'll need to use feature detection e.g.
https://github.com/ned14/Boost.BindLib/blob/master/include/cpp_feature
.h or
https://github.com/ned14/Boost.BindLib/blob/master/include/boost/confi
g.hpp if you prefer the Boost named macros.
Niall
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk