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

           Summary: measureTime doesn't work with unsafe template
                    functions
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: d...@dawgfoto.de


--- Comment #0 from d...@dawgfoto.de 2012-07-26 18:27:22 PDT ---
cat > bug.d << CODE
import std.datetime, std.stdio;

void main()
{
    auto mt = measureTime!((a) {
        writefln("Running tests took: %s ms", a.msecs());
    })();
}
CODE

dmd bug

----

I only had a short look at this. I think the core issue is that
std.traits.isSafe doesn't work for template functions.
With v2.057 isSafe used to fail silently for template functions so the unsafe
measureTime overload was chosen and everything worked accidentally.
Since v2.058 isSafe will print an error but the @safe overload is selected.

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

Reply via email to