Summary: isn't pure
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos

--- Comment #0 from 2010-09-10 12:51:04 PDT ---
This is a low-priority request, maybe a long-term one.

With dmd 2.048 this program shows that to!() is not pure:
test.d(3): Error: pure function 'main' cannot call impure function 'to'

import std.conv: to;
pure void main() {

But in theory the to!() doesn't need to change its inputs, and its output is
deterministic and fully determined by the input value. So eventually to!() may
become pure, so you may use it inside pure functions too.

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

Reply via email to