On Tuesday, 3 February 2015 at 18:16:20 UTC, Andrei Alexandrescu wrote:
    static assert(__traits(inlined),
      "Inlining of uart() must be supported.");

This is unworkable:

1. You want to be able to turn off inlining for debugging.

2. You would have to wait with evaluating static_assert until after optimization since the optimizer could decide to inline it at a late stage.

3. You should be able to take the address of the function.

Walter is right when saying that for D inlining is an optimization and should not be part of the semantics (but you could have an enforced hint). Querying optimization effects at compile time creates dependencies that may lead to computations that don't resolve.

Reply via email to