[libcxx-commits] [libcxx] [libc++] Implement P2985R0: std::is_virtual_base_of (PR #105847)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Aug 24 02:53:47 PDT 2024
================
@@ -26,6 +26,19 @@ template <class _Bp, class _Dp>
inline constexpr bool is_base_of_v = __is_base_of(_Bp, _Dp);
#endif
+#if _LIBCPP_STD_VER >= 26
+# if __has_builtin(__builtin_is_virtual_base_of)
+
+template <class _Base, class _Derived>
+struct _LIBCPP_TEMPLATE_VIS is_virtual_base_of
+ : public integral_constant<bool, __builtin_is_virtual_base_of(_Base, _Derived)> {};
----------------
philnik777 wrote:
```suggestion
: public bool_constant<__builtin_is_virtual_base_of(_Base, _Derived)> {};
```
https://github.com/llvm/llvm-project/pull/105847
More information about the libcxx-commits
mailing list