[cfe-dev] pair bug in clang (and libc++)

Stephan T. Lavavej stl at exchange.microsoft.com
Tue Jun 12 14:49:43 PDT 2012


Hi,

It appears that VC11's STL has found a bug in clang.  https://connect.microsoft.com/VisualStudio/feedback/details/747847/type-deduction-fail says "This code is simplified one from clang project and you can get the same error trying to compile clang using vc110."  (They didn't mention where the offending code was, but it should be easy enough to find.)

The issue is that when A has a user-defined conversion to B and B has a user-defined conversion to C, C++03/VC10 permits pair<A, X> to be converted (explicitly or implicitly) to pair<C, X>, while C++11/VC11 forbids this because A is not implicitly convertible to C.

Presumably, this also indicates that libc++ hasn't constrained its pair (and tuple!) as specified by C++11.  So, two bugs for the price of one.

Stephan T. Lavavej
Visual C++ Libraries Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120612/abef7b7d/attachment.html>


More information about the cfe-dev mailing list