mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 14:04:26 +02:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user