While checking the Phobos source I've found an interesting expression

      cast()(result[i]) = to!(E)(e);

The 'cast()' means 'cast to mutable', e.g.

      class S {}
      void g(S x) {}
      void main() {
         const S s;
         g(cast()s);
      }

But this is not documented in the D spec (CastParam cannot be empty). Is this an "accept-invalid" bug, or just a feature not yet documented?

Reply via email to