diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2021-01-26 19:51:22 -0800 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2021-01-28 15:07:27 -0800 |
commit | 17c584551d573f1693990773e29fbe6b4b6fa4f4 (patch) | |
tree | fe37898bc8a7db70b9da9de3fe01622b42f93d8d /llvm/tools/llvm-readobj/llvm-readobj.cpp | |
parent | e056fc6cb676f72d5b7dfe7ca540b3275bd1a46f (diff) | |
download | llvm-17c584551d573f1693990773e29fbe6b4b6fa4f4.zip llvm-17c584551d573f1693990773e29fbe6b4b6fa4f4.tar.gz llvm-17c584551d573f1693990773e29fbe6b4b6fa4f4.tar.bz2 |
ADT: Add SFINAE to the generic IntrusiveRefCntPtr constructors
Add an `enable_if` to the generic `IntrusiveRefCntPtr` constructors so
that std::is_convertible gives an honest answer when the underlying
pointers cannot be converted. Added `static_assert`s to the test suite
to verify.
Also combine generic constructors from `IntrusiveRefCntPtr<X>&&` and
`const IntrusiveRefCntPtr<X>&`. At first glance this appears to be an
infinite loop, but the real copy/move constructors are spelled out
separately above. Added a unit test to verify.
Differential Revision: https://reviews.llvm.org/D95498
Diffstat (limited to 'llvm/tools/llvm-readobj/llvm-readobj.cpp')
0 files changed, 0 insertions, 0 deletions