mirror of
https://github.com/boostorg/container.git
synced 2025-08-03 06:24: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>
|
: public dtl::integral_constant<unsigned, V>
|
||||||
{
|
{
|
||||||
typedef T type;
|
typedef T type;
|
||||||
|
|
||||||
version_type(const version_type<T, 0>&);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace impl{
|
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>
|
template <class T>
|
||||||
struct extract_version<T, true>
|
struct extract_version
|
||||||
{
|
: T::version
|
||||||
static const unsigned value = T::version::value;
|
{};
|
||||||
};
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct has_version
|
struct has_version
|
||||||
|
Reference in New Issue
Block a user