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

David Blaikie dblaikie at gmail.com
Tue Jun 12 14:58:57 PDT 2012

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

Thanks for forwarding this on,

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

Yeah, it was surprising this was around as long as it was (as you
point out, in part because of bugs in other libstdc++/libc++) but it
was fixed a few days ago in

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

Yep, http://llvm.org/bugs/show_bug.cgi?id=13063 fixed in

Thanks again,
- David

More information about the cfe-dev mailing list