Revert "Merge to upstream r304942."
This reverts commit83b1388ecd, reversing changes made tof20819f925. Test: treehugger Bug: None
This commit is contained in:
@@ -8,14 +8,6 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
|
||||
// XFAIL: with_system_cxx_lib=macosx10.12
|
||||
// XFAIL: with_system_cxx_lib=macosx10.11
|
||||
// XFAIL: with_system_cxx_lib=macosx10.10
|
||||
// XFAIL: with_system_cxx_lib=macosx10.9
|
||||
// XFAIL: with_system_cxx_lib=macosx10.7
|
||||
// XFAIL: with_system_cxx_lib=macosx10.8
|
||||
|
||||
// <optional>
|
||||
|
||||
// constexpr T& optional<T>::value() &;
|
||||
|
||||
@@ -8,14 +8,6 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
|
||||
// XFAIL: with_system_cxx_lib=macosx10.12
|
||||
// XFAIL: with_system_cxx_lib=macosx10.11
|
||||
// XFAIL: with_system_cxx_lib=macosx10.10
|
||||
// XFAIL: with_system_cxx_lib=macosx10.9
|
||||
// XFAIL: with_system_cxx_lib=macosx10.7
|
||||
// XFAIL: with_system_cxx_lib=macosx10.8
|
||||
|
||||
// <optional>
|
||||
|
||||
// constexpr const T& optional<T>::value() const &;
|
||||
|
||||
@@ -8,14 +8,6 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
|
||||
// XFAIL: with_system_cxx_lib=macosx10.12
|
||||
// XFAIL: with_system_cxx_lib=macosx10.11
|
||||
// XFAIL: with_system_cxx_lib=macosx10.10
|
||||
// XFAIL: with_system_cxx_lib=macosx10.9
|
||||
// XFAIL: with_system_cxx_lib=macosx10.7
|
||||
// XFAIL: with_system_cxx_lib=macosx10.8
|
||||
|
||||
// <optional>
|
||||
|
||||
// constexpr const T& optional<T>::value() const &&;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
// <optional>
|
||||
|
||||
// template <class U> constexpr T optional<T>::value_or(U&& v) &&;
|
||||
// template <class U> T optional<T>::value_or(U&& v) &&;
|
||||
|
||||
#include <optional>
|
||||
#include <type_traits>
|
||||
@@ -26,22 +26,22 @@ struct Y
|
||||
{
|
||||
int i_;
|
||||
|
||||
constexpr Y(int i) : i_(i) {}
|
||||
Y(int i) : i_(i) {}
|
||||
};
|
||||
|
||||
struct X
|
||||
{
|
||||
int i_;
|
||||
|
||||
constexpr X(int i) : i_(i) {}
|
||||
constexpr X(X&& x) : i_(x.i_) {x.i_ = 0;}
|
||||
constexpr X(const Y& y) : i_(y.i_) {}
|
||||
constexpr X(Y&& y) : i_(y.i_+1) {}
|
||||
X(int i) : i_(i) {}
|
||||
X(X&& x) : i_(x.i_) {x.i_ = 0;}
|
||||
X(const Y& y) : i_(y.i_) {}
|
||||
X(Y&& y) : i_(y.i_+1) {}
|
||||
friend constexpr bool operator==(const X& x, const X& y)
|
||||
{return x.i_ == y.i_;}
|
||||
};
|
||||
|
||||
constexpr int test()
|
||||
int main()
|
||||
{
|
||||
{
|
||||
optional<X> opt(in_place, 2);
|
||||
@@ -65,10 +65,4 @@ constexpr int test()
|
||||
assert(std::move(opt).value_or(Y(3)) == 4);
|
||||
assert(!opt);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
static_assert(test() == 0);
|
||||
}
|
||||
|
||||
@@ -10,13 +10,6 @@
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
// <optional>
|
||||
|
||||
// XFAIL: with_system_cxx_lib=macosx10.12
|
||||
// XFAIL: with_system_cxx_lib=macosx10.11
|
||||
// XFAIL: with_system_cxx_lib=macosx10.10
|
||||
// XFAIL: with_system_cxx_lib=macosx10.9
|
||||
// XFAIL: with_system_cxx_lib=macosx10.7
|
||||
// XFAIL: with_system_cxx_lib=macosx10.8
|
||||
|
||||
// constexpr T& optional<T>::value() &&;
|
||||
|
||||
#include <optional>
|
||||
|
||||
Reference in New Issue
Block a user