27 Jun
2017
27 Jun
'17
5:26 p.m.
So I suspect this is a bug in 'type_traits' library, but I'm not sure. Hopefully somebody else can confirm. (I'm sorry but I don't know to whom should I CC this post.)
The short answer, is that a fully conforming is_convertible requires C++11 language features, so your test code is fine in C++11 or 14 mode but in 03 mode uses legacy code which is known not to work in every circumstance. clang works because the clang front end provides an intrinsic for is_convertible which gcc does not (last I checked). Of course that doesn't help you much, sorry, John. --- This email has been checked for viruses by AVG. http://www.avg.com