summaryrefslogtreecommitdiff
path: root/test/std/experimental/optional/optional.comp_with_t/equal.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/experimental/optional/optional.comp_with_t/equal.pass.cpp')
-rw-r--r--test/std/experimental/optional/optional.comp_with_t/equal.pass.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/test/std/experimental/optional/optional.comp_with_t/equal.pass.cpp b/test/std/experimental/optional/optional.comp_with_t/equal.pass.cpp
index e796723cc097..749fa7dcf0a1 100644
--- a/test/std/experimental/optional/optional.comp_with_t/equal.pass.cpp
+++ b/test/std/experimental/optional/optional.comp_with_t/equal.pass.cpp
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03, c++11
// <optional>
// template <class T> constexpr bool operator==(const optional<T>& x, const T& v);
@@ -14,8 +15,6 @@
#include <experimental/optional>
-#if _LIBCPP_STD_VER > 11
-
using std::experimental::optional;
struct X
@@ -27,16 +26,13 @@ struct X
constexpr bool operator == ( const X &lhs, const X &rhs )
{ return lhs.i_ == rhs.i_ ; }
-
-#endif
int main()
{
-#if _LIBCPP_STD_VER > 11
{
typedef X T;
typedef optional<T> O;
-
+
constexpr T val(2);
constexpr O o1; // disengaged
constexpr O o2{1}; // engaged
@@ -47,12 +43,11 @@ int main()
static_assert ( !(o3 == T(1)), "" );
static_assert ( (o3 == T(2)), "" );
static_assert ( (o3 == val), "" );
-
+
static_assert ( !(T(1) == o1), "" );
static_assert ( (T(1) == o2), "" );
static_assert ( !(T(1) == o3), "" );
static_assert ( (T(2) == o3), "" );
static_assert ( (val == o3), "" );
}
-#endif
}