[cfe-dev] [libcxx] RFC: C++14 and beyond
richard at metafoo.co.uk
Tue May 7 11:52:46 PDT 2013
On Tue, May 7, 2013 at 11:37 AM, Howard Hinnant <hhinnant at apple.com> wrote:
> So I'm thinking along these lines in <__config>, below where platforms
> customize things:
> #ifndef _LIBCPP_STD_VER
> # if 1 // -std=c++98/03/11
> # define _LIBCPP_STD_VER 11
> # elif 0 // -std=c++1y/14
> # define _LIBCPP_STD_VER 13 // current year, or date of std
> # elif 0 // -std=c++17
> // ...
> # endif
> #endif // _LIBCPP_STD_VER
> I can't make this work today because I can't tell the difference between
> -std=c++98/03/11 and -std=c++1y/14.
> If the client (or platform) desires, they can #define _LIBCPP_STD_VER and
> to whatever they want and <__config> will respect their definition.
> libcxx implementors can:
> #if _LIBCPP_STD_VER > 11
> // implement a post C++11 feature
> The clang driver could be taught how to set _LIBCPP_STD_VER.
> Thoughts? Help on telling the difference between -std=c++98/03/11 and
There's been some discussion on the -admin reflector about what value we
should use for __cplusplus, but it didn't reach anything that looked like
consensus. How about we use 201305L (ie, now) as the value for __cplusplus
for our c++1y mode for the 3.3 release, and you key off __cplusplus >
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev