[LLVMbugs] [Bug 13592] New: std::is_convertible is incorrect for abstract type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Aug 12 21:56:50 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13592

             Bug #: 13592
           Summary: std::is_convertible is incorrect for abstract type
           Product: libc++
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: mimomorin at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9042
  --> http://llvm.org/bugs/attachment.cgi?id=9042
Fixing is_convertible for abstract target types

`std::is_convertible<From, To>` should return false_type when `To` is an
abstract type. 
However, for example, 

    struct abstract
    {
        virtual int f() = 0;
    };

`std::is_convertible<abstract, abstract>` returns true_type. 
This is because clang's __is_convertible_to intrinsic ignores the abstractness
(I filed PR13591 for clang). 

Trivial patch attached.

-- 
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