https://bugs.llvm.org/show_bug.cgi?id=39050
Bug ID: 39050
Summary: is_trivially_copyable_v misbehaves
Product: libc++
Version: 7.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: philippe.groa...@gmail.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
Tested on various c++17 compatible versions on godbolt.
Assuming cppreference is correct
(https://en.cppreference.com/w/cpp/named_req/TriviallyCopyable) and my
interpretation of their text is also correct.
std::is_trivially_copyable_v doesn't follow the standard's definition.
Example 1, Trivial non-deleted destructor :
The deleted destructor should fail the check : https://godbolt.org/z/5BOO68
Example 2, at least one copy constructor, move constructor, copy assignment
operator, or move assignment operator is non-deleted :
There are no copy/move ctors or assignement operators, should fail the check :
https://godbolt.org/z/APcHua
I tested on gcc with the same results. I'm assuming I've missed something.
Does libc++ use is_trivially_copyable_v internally for vector resize?
--
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