forked from boostorg/core
Add ADL guard for empty_value and new member typedef
This commit is contained in:
@ -85,6 +85,8 @@ struct empty_init_t { };
|
|||||||
template<class T, unsigned Index = 0, bool Empty = ``/see below/``>
|
template<class T, unsigned Index = 0, bool Empty = ``/see below/``>
|
||||||
class empty_value {
|
class empty_value {
|
||||||
public:
|
public:
|
||||||
|
typedef T type;
|
||||||
|
|
||||||
empty_value() = default;
|
empty_value() = default;
|
||||||
|
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
@ -107,6 +109,12 @@ public:
|
|||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|
||||||
|
[section Member types]
|
||||||
|
|
||||||
|
[variablelist [[`type`][The template parameter `T`]]]
|
||||||
|
|
||||||
|
[endsect]
|
||||||
|
|
||||||
[section Constructors]
|
[section Constructors]
|
||||||
|
|
||||||
[variablelist
|
[variablelist
|
||||||
|
@ -40,9 +40,13 @@ struct use_empty_value_base {
|
|||||||
|
|
||||||
struct empty_init_t { };
|
struct empty_init_t { };
|
||||||
|
|
||||||
|
namespace empty_ {
|
||||||
|
|
||||||
template<class T, unsigned N = 0, bool E = use_empty_value_base<T>::value>
|
template<class T, unsigned N = 0, bool E = use_empty_value_base<T>::value>
|
||||||
class empty_value {
|
class empty_value {
|
||||||
public:
|
public:
|
||||||
|
typedef T type;
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
|
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
|
||||||
empty_value() = default;
|
empty_value() = default;
|
||||||
#else
|
#else
|
||||||
@ -85,6 +89,8 @@ template<class T, unsigned N>
|
|||||||
class empty_value<T, N, true>
|
class empty_value<T, N, true>
|
||||||
: T {
|
: T {
|
||||||
public:
|
public:
|
||||||
|
typedef T type;
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
|
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
|
||||||
empty_value() = default;
|
empty_value() = default;
|
||||||
#else
|
#else
|
||||||
@ -120,6 +126,10 @@ public:
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
} /* empty_ */
|
||||||
|
|
||||||
|
using empty_::empty_value;
|
||||||
|
|
||||||
} /* boost */
|
} /* boost */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user