November 18, 2018 Issues » [Issue 19409] New: static if (__traits(compiles, __traits(identifier, ...))) evaluates to false even though the expression alone evaluates to true | |||
|---|---|---|---|
| |||
...foo)); // "foo" pragma(msg, __traits(compiles, __traits(identifier, test.foo))); // true static assert(__traits(compiles... | |||
November 14, 2018 Issues » [Issue 19371] Taking address of ref return in @safe code: compile-time checks fail | |||
|---|---|---|---|
| |||
...are not contradicting:
pragma(msg, typeof(() @safe { return &get(); })); // _error_
static assert(!is(typeof(() @safe... | |||
November 10, 2018 Issues » [Issue 19371] Taking address of ref return in @safe code: compile-time checks fail | |||
|---|---|---|---|
| |||
...typeof()) still stands
though:
pragma(msg, typeof(() @safe...this should pass:
static assert(!is(typeof(() @safe... | |||
October 23, 2018 Issues » [Issue 19328] New: isExpression does not allow to check conversion to delegate/function | |||
|---|---|---|---|
| |||
...if( is( Fn Params == Params* ) )
pragma(msg, "pointer");
else
static assert( false, "Argument has no... | |||
October 22, 2018 Learn » Re: need help about get all public static function name | |||
|---|---|---|---|
| |||
...static assert(hasMember!(BaseType, name));
static if( __traits(isStaticFunction, __traits(getMember, BaseType, name)) ) {
pragma(msg... | |||
October 22, 2018 Learn » Re: need help about get all public static function name | |||
|---|---|---|---|
| |||
...static assert( hasMember!(BaseType.init, name));
static if( __traits(isStaticFunction, __traits(getMember, BaseType, name)) ) {
pragma... | |||
October 12, 2018 Issues » [Issue 19303] New: hasMember fails to recognize member (interaction with mixin template) | |||
|---|---|---|---|
| |||
...two lines:
pragma(msg, P.ElementType);
static assert(hasMember!(P, "ElementType"));
The pragma correctly prints... | |||
October 08, 2018 Issues » [Issue 19292] Mixin expressions should take an argument list the same as pragma(msg) does | |||
|---|---|---|---|
| |||
...com> ---
Test case:
int test() {
return mixin("1", 2);
}
void testit() {
static assert(test() == 12);
}
-- | |||
September 03, 2018 Learn » Re: Structures and CTFE | |||
|---|---|---|---|
| |||
...a pragma where you static assert for Foo(1).pos equality with 2: -- static assert... | |||
September 03, 2018 Learn » Structures and CTFE | |||
|---|---|---|---|
| |||
...pragma(msg, pos);
}
}
dmd -o- -unittest source/pgs/parser.d
1LU
1LU
---
The static assert... | |||
Copyright © 1999-2021 by the D Language Foundation