[LLVMbugs] [Bug 7080] New: Failure in is_convertible implementation in boost

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 6 17:18:48 PDT 2010


           Summary: Failure in is_convertible implementation in boost
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chris at bubblescope.net
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com

The following code shows a reduced example of the is_convertible implementation
used in boost for the implementation of rvalue references. This code compiles
in g++ but doesn't compile in clang++.

template <class T, class U>
class is_convertible
   typedef char true_t;
   class false_t { char dummy[2]; };
   static true_t dispatch(U);
   static false_t dispatch(...);
   static T trigger();
   enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) };

template <class T>
class rv : public T
{ };

int main(void)
{ is_convertible<int, rv<int>&>::value;     }

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list