-
Notifications
You must be signed in to change notification settings - Fork 15.7k
Description
| Bugzilla Link | 39050 |
| Version | 7.0 |
| OS | Windows NT |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor,@mclow,@zygoloid,@rjmccall |
Extended Description
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?