Search

February 12, 2020
General »
    static if (condition) pragma(msg, "Look, Ma!");

Or static assert().

Note that the compiler already...
January 16, 2020
Issues »
...such as `pragma(msg)` and `enum`,
  but not others, such as `static assert`, hence why...
January 16, 2020
Issues »
...such as `pragma(msg)` and `enum`,
  but not others, such as `static assert`, hence why...
January 10, 2020
Learn »
...mod1;
    pragma(msg, "C");

    static assert(a == "foo");
    static assert(b == "");      // Error: static assert:  "foo...
December 12, 2019
Learn »
...3.0f)); // 1077936128u
pragma (msg, bitRepresentation(3.0));  // 4613937818241073152LU

void main()
{
    static assert(bitRepresentation(3...
November 21, 2019
Issues »
...Foo : string { bar = "baz" }

pragma(msg, ReplaceType!(char...Enum : string { foo = "Bar" }
    assert(is(ReplaceType!(char...
November 12, 2019
General »
...pragma Assume has a clear meaning and works fine.

Given that we already have assert...
October 27, 2019
Learn »
...string));
    assert(r);
    assert(r.pre == "a*");
    assert...private size_t _offset;

    pragma(inline, true):

        inout...
October 27, 2019
Learn »
...string));
    assert(r);
    assert(r.pre == "a*");
    assert...offset;

        auto pre() @trusted
        {
            pragma(inline, true);
            if...
October 15, 2019
General »
...contracts, out contracts, and assert statements, e.g...end of the message.

pragma(msg) get's...
13 14 15 16 17 18 19 20 21 22 23 24
Next ›   Last »