On Tue, May 7, 2013 at 11:56 AM, Howard Hinnant <span dir="ltr"><<a href="mailto:hhinnant@apple.com" target="_blank">hhinnant@apple.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On May 7, 2013, at 2:52 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
<br>
> On Tue, May 7, 2013 at 11:37 AM, Howard Hinnant <<a href="mailto:hhinnant@apple.com">hhinnant@apple.com</a>> wrote:<br>
> So I'm thinking along these lines in <__config>, below where platforms customize things:<br>
><br>
> #ifndef _LIBCPP_STD_VER<br>
> #  if  1 // -std=c++98/03/11<br>
> #    define _LIBCPP_STD_VER 11<br>
> #  elif 0 // -std=c++1y/14<br>
> #    define _LIBCPP_STD_VER 13  // current year, or date of std ratification<br>
> #  elif 0 // -std=c++17<br>
>    // ...<br>
> #  endif<br>
> #endif  // _LIBCPP_STD_VER<br>
><br>
> 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.<br>
><br>
> If the client (or platform) desires, they can #define _LIBCPP_STD_VER and to whatever they want and <__config> will respect their definition.<br>
><br>
> libcxx implementors can:<br>
><br>
> #if _LIBCPP_STD_VER > 11<br>
><br>
> // implement a post C++11 feature<br>
><br>
> #endif<br>
><br>
> The clang driver could be taught how to set _LIBCPP_STD_VER.<br>
><br>
> Thoughts?  Help on telling the difference between -std=c++98/03/11 and -std=c++1y/14?<br>
><br>
> 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 > 201103L ?<br>

<br>
</div></div>That sounds fine with me.  If there's any political problems with that, using a "throw away" macro (e.g. __experimental_1y, _MAKE_HOWARD_HAPPY) or whatever would be fine too.  :-)  libcxx can adapt to changing clangs.</blockquote>
<div><br></div><div>Done. </div></div>