https://llvm.org/bugs/show_bug.cgi?id=27538
Bug ID: 27538 Summary: Some type_traits return incorrect values when used by gcc Product: libc++ Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: unassignedclangb...@nondot.org Reporter: tomasz.sniatowski+l...@gmail.com CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com Classification: Unclassified Using G++ 4.8/4.9 with libc++ as provided by libc++-helpers on Ubuntu 14.04, or as available in Android NDK, some type traits don't work as expected: * std::is_convertible<char[], std::string>::value is false * with struct A { int a; }; std::is_trivially_copyable<A>::value is false For example: $ cat trivially_copyable.cpp #include <type_traits> struct A { int a; }; static_assert(std::is_trivially_copyable<A>::value, "A"); $ g++-libc++ trivially_copyable.cpp trivially_copyable.cpp:3:1: error: static assertion failed: A static_assert(std::is_trivially_copyable<A>::value, "A"); ^ The above works with the same libc++ when compiled by clang++. This happens for me with the libc++ provided in android-ndk-r11c which is noted as based on "svn: http://llvm.org/svn/llvm-project/libcxx/trunk revision: 201101", also happens on ubuntu with libc++-helpers:all/trusty 1.0~svn199600-1 See https://code.google.com/p/android/issues/detail?id=208352 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs