[llvm-bugs] [Bug 27538] New: Some type_traits return incorrect values when used by gcc
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Apr 27 07:37:59 PDT 2016
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: unassignedclangbugs at nondot.org
Reporter: tomasz.sniatowski+llvm at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160427/04295247/attachment.html>
More information about the llvm-bugs
mailing list