mirror of
https://github.com/TartanLlama/optional.git
synced 2025-06-25 00:51:37 +02:00
@ -1032,32 +1032,12 @@ public:
|
||||
#endif
|
||||
|
||||
/// Takes the value out of the optional, leaving it empty
|
||||
optional take() & {
|
||||
optional ret = *this;
|
||||
reset();
|
||||
return ret;
|
||||
}
|
||||
|
||||
optional take() const & {
|
||||
optional ret = *this;
|
||||
reset();
|
||||
return ret;
|
||||
}
|
||||
|
||||
optional take() && {
|
||||
optional take() {
|
||||
optional ret = std::move(*this);
|
||||
reset();
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef TL_OPTIONAL_NO_CONSTRR
|
||||
optional take() const && {
|
||||
optional ret = std::move(*this);
|
||||
reset();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
using value_type = T;
|
||||
|
||||
/// Constructs an optional that does not contain a value.
|
||||
@ -1926,32 +1906,12 @@ public:
|
||||
#endif
|
||||
|
||||
/// Takes the value out of the optional, leaving it empty
|
||||
optional take() & {
|
||||
optional ret = *this;
|
||||
reset();
|
||||
return ret;
|
||||
}
|
||||
|
||||
optional take() const & {
|
||||
optional ret = *this;
|
||||
reset();
|
||||
return ret;
|
||||
}
|
||||
|
||||
optional take() && {
|
||||
optional take() {
|
||||
optional ret = std::move(*this);
|
||||
reset();
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef TL_OPTIONAL_NO_CONSTRR
|
||||
optional take() const && {
|
||||
optional ret = std::move(*this);
|
||||
reset();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
using value_type = T &;
|
||||
|
||||
/// Constructs an optional that does not contain a value.
|
||||
|
Reference in New Issue
Block a user