[cfe-commits] [Patch][Review] constexpr-ification of <limits> and random number generators

Howard Hinnant hhinnant at apple.com
Sun Apr 1 11:47:23 PDT 2012


On Apr 1, 2012, at 2:40 PM, Howard Hinnant wrote:

> On Apr 1, 2012, at 2:38 PM, Richard Smith wrote:
> 
>> On Sun, Apr 1, 2012 at 11:23 AM, Howard Hinnant <hhinnant at apple.com> wrote:
>> 
>> How about just:
>> 
>> #ifndef _LIBCPP_HAS_NO_CONSTEXPR
>> #define _LIBCPP_CONSTEXPR constexpr
>> #else
>> #define _LIBCPP_CONSTEXPR
>> #endif
>> 
>> Then use
>> 
>> _LIBCPP_CONSTEXPR const int n = 5;
>> 
>> for variables, and
>> 
>> struct S {
>>  _LIBCPP_CONSTEXPR int f() const;
>> };
>> 
>> for functions.
> 
> Your survey/mapping is helpful.  But what about constexpr constructors?

Oh, never mind.  Reading too fast! :-)

struct S
{
    _LIBCPP_CONSTEXPR S();
};

Howard




More information about the cfe-commits mailing list