[LLVMbugs] [Bug 13063] New: Incorrect pair in C++11 and C++98 mode.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 8 16:57:15 PDT 2012


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

             Bug #: 13063
           Summary: Incorrect pair in C++11 and C++98 mode.
           Product: libc++
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: bigcheesegs at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The following is correct C++03, but incorrect C++11.

#include <utility>
#include <vector>

class Value;

class DIType {
  operator Value*()const {return 0;}
};

class WeakVH {
  WeakVH(Value*) {}
};

int main() {
  DIType di;
  std::pair<void*, WeakVH> p(std::make_pair((void*)0, di)));
}

VS 2012 RC and libstdc++4.7 reject this in C++11. libc++ accepts it in C++11,
and rejects it in C++98.

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