[Issue 8878] std.range is not pure

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 23 11:22:30 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8878


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jmdavisProg at gmx.com
         Resolution|                            |WONTFIX


--- Comment #1 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-10-23 11:22:28 PDT ---
pure is inferred for templated functions. As long as the functions for the
range used are pure, then the functions in std.range and std.algorithm will
generally be pure. There may be some compiler bugs which make it so that that
doesn't always work like it's supposed to, but pretty much zero functions in
std.range and std.algorithm should be marked as pure, since whether they can be
pure or not really depends on the types used with them, which is why attribute
inferrence for templates was introduced in the first place.

If you have an issue with a specific function with a specific type which does
have pure member functions and the templated function is not being inferred as
pure, then please report it with an appropriate code sample, but it would be
wrong to specifically provide pure versions of functions like iota or zip.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list