mirror of
https://github.com/boostorg/container.git
synced 2025-08-03 06:24:26 +02:00
Add more is_class, is_class_or_union, is_enum specialization to pair to allow recursive containers and type traits intrinsics
This commit is contained in:
@@ -283,6 +283,12 @@ struct is_enum< ::boost::container::container_detail::pair<T, U> >
|
|||||||
static const bool value = false;
|
static const bool value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<class T, class U>
|
||||||
|
struct is_enum< ::std::pair<T, U> >
|
||||||
|
{
|
||||||
|
static const bool value = false;
|
||||||
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct is_class;
|
struct is_class;
|
||||||
|
|
||||||
@@ -325,8 +331,43 @@ struct is_class_or_union< std::pair<T1, T2> >
|
|||||||
static const bool value = true;
|
static const bool value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct is_union;
|
||||||
|
|
||||||
|
template <class T1, class T2>
|
||||||
|
struct is_union< ::boost::container::container_detail::pair<T1, T2> >
|
||||||
|
//This specialization is needed to avoid instantiation of pair in
|
||||||
|
//is_class, and allow recursive maps.
|
||||||
|
{
|
||||||
|
static const bool value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T1, class T2>
|
||||||
|
struct is_union< std::pair<T1, T2> >
|
||||||
|
//This specialization is needed to avoid instantiation of pair in
|
||||||
|
//is_class, and allow recursive maps.
|
||||||
|
{
|
||||||
|
static const bool value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct is_class;
|
||||||
|
|
||||||
|
template <class T1, class T2>
|
||||||
|
struct is_class< ::boost::container::container_detail::pair<T1, T2> >
|
||||||
|
//This specialization is needed to avoid instantiation of pair in
|
||||||
|
//is_class, and allow recursive maps.
|
||||||
|
{
|
||||||
|
static const bool value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T1, class T2>
|
||||||
|
struct is_class< std::pair<T1, T2> >
|
||||||
|
//This specialization is needed to avoid instantiation of pair in
|
||||||
|
//is_class, and allow recursive maps.
|
||||||
|
{
|
||||||
|
static const bool value = true;
|
||||||
|
};
|
||||||
|
|
||||||
} //namespace move_detail{
|
} //namespace move_detail{
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user