Summary: ElementType!(void[]) shows error message.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from SHOO <> 2010-08-02 03:00:40 PDT ---
This code displays an error:

-------------- main.d ----------------------
import std.range;
pragma(msg, ElementType!(void[]));
dmd -c main
std\array.d(357): Error: [i] has no effect in expression (a[0u])

I think that this error message should be removed.

If there is not an objection, I rewrite ElementType template as this:
template ElementType(R)
    static if (is(typeof({return R.init.front();}()) T))
        alias T ElementType;
        alias void ElementType;

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to