forked from boostorg/core
Qualify empty_init_t and use_empty_value_base
This commit is contained in:
@@ -92,9 +92,9 @@ public:
|
|||||||
template<class... Args>
|
template<class... Args>
|
||||||
explicit empty_value(empty_init_t, Args&&... args);
|
explicit empty_value(empty_init_t, Args&&... args);
|
||||||
|
|
||||||
const T& get() const;
|
const T& get() const noexcept;
|
||||||
|
|
||||||
T& get();
|
T& get() noexcept;
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* boost */
|
} /* boost */
|
||||||
@@ -127,8 +127,8 @@ public:
|
|||||||
[section Member functions]
|
[section Member functions]
|
||||||
|
|
||||||
[variablelist
|
[variablelist
|
||||||
[[`const T& get() const;`][Returns the value]]
|
[[`const T& get() const noexcept;`][Returns the value]]
|
||||||
[[`T& get();`][Returns the value]]]
|
[[`T& get() noexcept;`][Returns the value]]]
|
||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|
||||||
|
@@ -42,7 +42,8 @@ struct empty_init_t { };
|
|||||||
|
|
||||||
namespace empty_ {
|
namespace empty_ {
|
||||||
|
|
||||||
template<class T, unsigned N = 0, bool E = use_empty_value_base<T>::value>
|
template<class T, unsigned N = 0,
|
||||||
|
bool E = boost::use_empty_value_base<T>::value>
|
||||||
class empty_value {
|
class empty_value {
|
||||||
public:
|
public:
|
||||||
typedef T type;
|
typedef T type;
|
||||||
@@ -53,22 +54,22 @@ public:
|
|||||||
empty_value() { }
|
empty_value() { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
empty_value(empty_init_t)
|
empty_value(boost::empty_init_t)
|
||||||
: value_() { }
|
: value_() { }
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
explicit empty_value(empty_init_t, Args&&... args)
|
explicit empty_value(boost::empty_init_t, Args&&... args)
|
||||||
: value_(std::forward<Args>(args)...) { }
|
: value_(std::forward<Args>(args)...) { }
|
||||||
#else
|
#else
|
||||||
template<class U>
|
template<class U>
|
||||||
empty_value(empty_init_t, U&& value)
|
empty_value(boost::empty_init_t, U&& value)
|
||||||
: value_(std::forward<U>(value)) { }
|
: value_(std::forward<U>(value)) { }
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
template<class U>
|
template<class U>
|
||||||
empty_value(empty_init_t, const U& value)
|
empty_value(boost::empty_init_t, const U& value)
|
||||||
: value_(value) { }
|
: value_(value) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -97,22 +98,22 @@ public:
|
|||||||
empty_value() { }
|
empty_value() { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
empty_value(empty_init_t)
|
empty_value(boost::empty_init_t)
|
||||||
: T() { }
|
: T() { }
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
explicit empty_value(empty_init_t, Args&&... args)
|
explicit empty_value(boost::empty_init_t, Args&&... args)
|
||||||
: T(std::forward<Args>(args)...) { }
|
: T(std::forward<Args>(args)...) { }
|
||||||
#else
|
#else
|
||||||
template<class U>
|
template<class U>
|
||||||
empty_value(empty_init_t, U&& value)
|
empty_value(boost::empty_init_t, U&& value)
|
||||||
: T(std::forward<U>(value)) { }
|
: T(std::forward<U>(value)) { }
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
template<class U>
|
template<class U>
|
||||||
empty_value(empty_init_t, const U& value)
|
empty_value(boost::empty_init_t, const U& value)
|
||||||
: T(value) { }
|
: T(value) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user