mirror of
https://github.com/pybind/pybind11.git
synced 2024-12-01 17:37:15 +00:00
Fix is_template_base_of on VS with LLVM/Intel toolset (#1020)
This commit is contained in:
parent
4336a7da4a
commit
3271fecfde
@ -659,9 +659,9 @@ struct is_template_base_of_impl {
|
|||||||
/// `is_template_base_of<Base, T>` is true if `struct T : Base<U> {}` where U can be anything
|
/// `is_template_base_of<Base, T>` is true if `struct T : Base<U> {}` where U can be anything
|
||||||
template <template<typename...> class Base, typename T>
|
template <template<typename...> class Base, typename T>
|
||||||
#if !defined(_MSC_VER)
|
#if !defined(_MSC_VER)
|
||||||
using is_template_base_of = decltype(is_template_base_of_impl<Base>::check((remove_cv_t<T>*)nullptr));
|
using is_template_base_of = decltype(is_template_base_of_impl<Base>::check((intrinsic_t<T>*)nullptr));
|
||||||
#else // MSVC2015 has trouble with decltype in template aliases
|
#else // MSVC2015 has trouble with decltype in template aliases
|
||||||
struct is_template_base_of : decltype(is_template_base_of_impl<Base>::check((remove_cv_t<T>*)nullptr)) { };
|
struct is_template_base_of : decltype(is_template_base_of_impl<Base>::check((intrinsic_t<T>*)nullptr)) { };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Check if T is an instantiation of the template `Class`. For example:
|
/// Check if T is an instantiation of the template `Class`. For example:
|
||||||
|
Loading…
Reference in New Issue
Block a user