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

           Summary: [patch] std.range.put does not handle output ranges
                    implement via opDispatch; breaks on RefAppender
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: sandf...@jhu.edu


--- Comment #0 from Rob Jacques <sandf...@jhu.edu> 2010-09-17 10:14:54 PDT ---
std.range.put does not correctly introspect types which implement put via
opDispatch. This is fairly simple to fix by swapping hasMember out for a
__traits compiles test.

void put(R, E)(ref R r, E e)
{
+    static if (__traits(compiles, {return R.init.put(E.init);})  ) 
-    static if (hasMember!(R, "put") ||
-    (isPointer!R && is(pointerTarget!R == struct) &&
-     hasMember!(pointerTarget!R, "put")))
    {

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

Reply via email to