[libcxx-commits] [PATCH] D74292: [libcxx] adds [concept.derived]
Michael Schellenberger Costa via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Feb 9 00:03:39 PST 2020
miscco added inline comments.
================
Comment at: libcxx/include/concepts:155-158
+template<class Derived, class Base>
+concept derived_from =
+ is_base_of_v<Base, Derived> &&
+ is_convertible_v<const volatile Derived*, const volatile Base*>;
----------------
As before, this needs _Uglification.
Also note that `is_base_of_v` directly goes back to `__is_base_of` and you have the chain
__is_base_of -> i_base_of -> is_base_of_v
(See https://github.com/miscco/llvm-project/blob/bc29069dc401572ba62f7dd692a3474c1ead76c9/libcxx/include/type_traits#L1417-L1425)
So throughput would be better it you would again specialize for `__clang__` and use `__Is_base_of` directly
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74292/new/
https://reviews.llvm.org/D74292
More information about the libcxx-commits
mailing list