Stroustrup's slides about c++11 and c++14
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 14 20:10:08 PDT 2014
On 09/15/2014 04:53 AM, Timon Gehr wrote:
> On 09/15/2014 12:38 AM, Walter Bright wrote:
>> On 9/14/2014 2:48 PM, deadalnix wrote:
>>> If that is really a concern, please consider commenting on
>>> http://wiki.dlang.org/DIP31
>>
>> I haven't thought it through, but the DIP looks like a good idea.
>>
>> It should add the test case in this thread,
>>
>> static if(!is(typeof(x))) enum y=2;
>> static if(!is(typeof(y))) enum x=1;
>>
>> as being something that is detected and rejected by the compiler.
>>
>> Essentially, anything that is order-of-evaluation dependent should be
>> detected and rejected.
>
> (It is furthermore also important that most programs that are not
> dependent on evaluation order are still accepted.)
To elaborate a little: The following simple test case cannot be accepted
using a strategy that alternately analyses AST nodes and poisons symbols
that do not occur in certain scopes:
enum x = "enum xx = q{int y = 0;};";
struct SS{
mixin(xx);
mixin(x);
}
However, it can be given a unique meaning.
More information about the Digitalmars-d
mailing list