Avoid using is_convertible during allocator version detection to avoid incomplete type problems in clang compilers. has_version, has already checked the existence of the "version" typedef.

This commit is contained in:
Ion Gaztañaga
2019-03-26 22:42:10 +01:00
parent fa36fbb9a7
commit 0691018321

View File

@@ -39,24 +39,14 @@ struct version_type
: public dtl::integral_constant<unsigned, V>
{
typedef T type;
version_type(const version_type<T, 0>&);
};
namespace impl{
template <class T,
bool = dtl::is_convertible<version_type<T, 0>, typename T::version>::value>
struct extract_version
{
static const unsigned value = 1;
};
template <class T>
struct extract_version<T, true>
{
static const unsigned value = T::version::value;
};
struct extract_version
: T::version
{};
template <class T>
struct has_version