[OT] Modules dropped out of C++17

weaselcat via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 9 00:59:40 PDT 2015


On Tuesday, 9 June 2015 at 07:58:04 UTC, Kagamin wrote:
> On Monday, 8 June 2015 at 22:22:51 UTC, Andrei Alexandrescu 
> wrote:
>> On 6/8/15 1:25 PM, ponce wrote:
>>> C++'s constexpr looks broken because everything must be marked
>>> constexpre, which defeats the purpose of having compile-time 
>>> code
>>> looking like runtime code. But I never had the pleasure to 
>>> use it.
>>
>> Yeah, it's sadly quite björked. Scott Meyers and I looked at 
>> the feature and the logical conclusion for a guideline was 
>> "Speculatively mark everything in sight as constexpr". That 
>> doesn't quite scale. -- Andrei
>
> Same as with @safe @nogc @nothrow @pure. If you don't have 
> ctfeability expressed in function's contract, you have no idea 
> how you can modify the function's implementation so that to not 
> break other people's code. Sorry for making c++ look cute again 
> :)

simple solution:
just make everything a template, and alias empty-templated 
functions ;)

also, AFAIK in 2.068 auto return functions are getting attribute 
inference.


More information about the Digitalmars-d mailing list