mirror of
https://github.com/boostorg/core.git
synced 2025-07-29 20:37:22 +02:00
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/``>
|
||||
class empty_value {
|
||||
public:
|
||||
typedef T type;
|
||||
|
||||
empty_value() = default;
|
||||
|
||||
template<class... Args>
|
||||
@ -107,6 +109,12 @@ public:
|
||||
|
||||
[endsect]
|
||||
|
||||
[section Member types]
|
||||
|
||||
[variablelist [[`type`][The template parameter `T`]]]
|
||||
|
||||
[endsect]
|
||||
|
||||
[section Constructors]
|
||||
|
||||
[variablelist
|
||||
|
@ -40,9 +40,13 @@ struct use_empty_value_base {
|
||||
|
||||
struct empty_init_t { };
|
||||
|
||||
namespace empty_ {
|
||||
|
||||
template<class T, unsigned N = 0, bool E = use_empty_value_base<T>::value>
|
||||
class empty_value {
|
||||
public:
|
||||
typedef T type;
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
|
||||
empty_value() = default;
|
||||
#else
|
||||
@ -85,6 +89,8 @@ template<class T, unsigned N>
|
||||
class empty_value<T, N, true>
|
||||
: T {
|
||||
public:
|
||||
typedef T type;
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
|
||||
empty_value() = default;
|
||||
#else
|
||||
@ -120,6 +126,10 @@ public:
|
||||
};
|
||||
#endif
|
||||
|
||||
} /* empty_ */
|
||||
|
||||
using empty_::empty_value;
|
||||
|
||||
} /* boost */
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user