summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/optional/optional.comp_with_t
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-10-12 06:48:31 +0000
committerEric Fiselier <eric@efcs.ca>2016-10-12 06:48:31 +0000
commitfc647db3ee8215ab2fa5f7cdea8d327c2faa768f (patch)
treee81dc360c9c06b9a32303243d77c4c7325f8897f /libcxx/test/std/utilities/optional/optional.comp_with_t
parent6ee4001cc957acac39181b68193e1414c3163698 (diff)
downloadbcm5719-llvm-fc647db3ee8215ab2fa5f7cdea8d327c2faa768f.tar.gz
bcm5719-llvm-fc647db3ee8215ab2fa5f7cdea8d327c2faa768f.zip
Revert Add <optional>. Will recommit with better commit message
llvm-svn: 283978
Diffstat (limited to 'libcxx/test/std/utilities/optional/optional.comp_with_t')
-rw-r--r--libcxx/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp53
-rw-r--r--libcxx/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp55
-rw-r--r--libcxx/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp55
-rw-r--r--libcxx/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp55
-rw-r--r--libcxx/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp55
-rw-r--r--libcxx/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp53
6 files changed, 0 insertions, 326 deletions
diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp
deleted file mode 100644
index b54a08f5575..00000000000
--- a/libcxx/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03, c++11, c++14
-// <optional>
-
-// template <class T> constexpr bool operator==(const optional<T>& x, const T& v);
-// template <class T> constexpr bool operator==(const T& v, const optional<T>& x);
-
-#include <optional>
-
-using std::optional;
-
-struct X
-{
- int i_;
-
- constexpr X(int i) : i_(i) {}
-};
-
-constexpr bool operator == ( const X &lhs, const X &rhs )
- { return lhs.i_ == rhs.i_ ; }
-
-int main()
-{
- {
- typedef X T;
- typedef optional<T> O;
-
- constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( !(o1 == T(1)), "" );
- static_assert ( (o2 == T(1)), "" );
- 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), "" );
- }
-}
diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp
deleted file mode 100644
index 064114fb9db..00000000000
--- a/libcxx/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03, c++11, c++14
-// <optional>
-
-// template <class T> constexpr bool operator>(const optional<T>& x, const T& v);
-// template <class T> constexpr bool operator>(const T& v, const optional<T>& x);
-
-#include <optional>
-
-using std::optional;
-
-struct X
-{
- int i_;
-
- constexpr X(int i) : i_(i) {}
-};
-
-constexpr bool operator > ( const X &lhs, const X &rhs )
- { return lhs.i_ > rhs.i_ ; }
-
-int main()
-{
- {
- typedef X T;
- typedef optional<T> O;
-
- constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( !(o1 > T(1)), "" );
- static_assert ( !(o2 > T(1)), "" ); // equal
- static_assert ( (o3 > T(1)), "" );
- static_assert ( !(o2 > val), "" );
- static_assert ( !(o3 > val), "" ); // equal
- static_assert ( !(o3 > T(3)), "" );
-
- static_assert ( (T(1) > o1), "" );
- static_assert ( !(T(1) > o2), "" ); // equal
- static_assert ( !(T(1) > o3), "" );
- static_assert ( (val > o2), "" );
- static_assert ( !(val > o3), "" ); // equal
- static_assert ( (T(3) > o3), "" );
- }
-}
diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp
deleted file mode 100644
index 663686cdf34..00000000000
--- a/libcxx/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03, c++11, c++14
-// <optional>
-
-// template <class T> constexpr bool operator>=(const optional<T>& x, const T& v);
-// template <class T> constexpr bool operator>=(const T& v, const optional<T>& x);
-
-#include <optional>
-
-using std::optional;
-
-struct X
-{
- int i_;
-
- constexpr X(int i) : i_(i) {}
-};
-
-constexpr bool operator >= ( const X &lhs, const X &rhs )
- { return lhs.i_ >= rhs.i_ ; }
-
-int main()
-{
- {
- typedef X T;
- typedef optional<T> O;
-
- constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( !(o1 >= T(1)), "" );
- static_assert ( (o2 >= T(1)), "" ); // equal
- static_assert ( (o3 >= T(1)), "" );
- static_assert ( !(o2 >= val), "" );
- static_assert ( (o3 >= val), "" ); // equal
- static_assert ( !(o3 >= T(3)), "" );
-
- static_assert ( (T(1) >= o1), "" );
- static_assert ( (T(1) >= o2), "" ); // equal
- static_assert ( !(T(1) >= o3), "" );
- static_assert ( (val >= o2), "" );
- static_assert ( (val >= o3), "" ); // equal
- static_assert ( (T(3) >= o3), "" );
- }
-}
diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp
deleted file mode 100644
index 05ac5eb12b4..00000000000
--- a/libcxx/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03, c++11, c++14
-// <optional>
-
-// template <class T> constexpr bool operator<=(const optional<T>& x, const T& v);
-// template <class T> constexpr bool operator<=(const T& v, const optional<T>& x);
-
-#include <optional>
-
-using std::optional;
-
-struct X
-{
- int i_;
-
- constexpr X(int i) : i_(i) {}
-};
-
-constexpr bool operator <= ( const X &lhs, const X &rhs )
- { return lhs.i_ <= rhs.i_ ; }
-
-int main()
-{
- {
- typedef X T;
- typedef optional<T> O;
-
- constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( (o1 <= T(1)), "" );
- static_assert ( (o2 <= T(1)), "" ); // equal
- static_assert ( !(o3 <= T(1)), "" );
- static_assert ( (o2 <= val), "" );
- static_assert ( (o3 <= val), "" ); // equal
- static_assert ( (o3 <= T(3)), "" );
-
- static_assert ( !(T(1) <= o1), "" );
- static_assert ( (T(1) <= o2), "" ); // equal
- static_assert ( (T(1) <= o3), "" );
- static_assert ( !(val <= o2), "" );
- static_assert ( (val <= o3), "" ); // equal
- static_assert ( !(T(3) <= o3), "" );
- }
-}
diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp
deleted file mode 100644
index d1891a286d7..00000000000
--- a/libcxx/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03, c++11, c++14
-// <optional>
-
-// template <class T> constexpr bool operator<(const optional<T>& x, const T& v);
-// template <class T> constexpr bool operator<(const T& v, const optional<T>& x);
-
-#include <optional>
-
-using std::optional;
-
-struct X
-{
- int i_;
-
- constexpr X(int i) : i_(i) {}
-};
-
-constexpr bool operator < ( const X &lhs, const X &rhs )
- { return lhs.i_ < rhs.i_ ; }
-
-int main()
-{
- {
- typedef X T;
- typedef optional<T> O;
-
- constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( (o1 < T(1)), "" );
- static_assert ( !(o2 < T(1)), "" ); // equal
- static_assert ( !(o3 < T(1)), "" );
- static_assert ( (o2 < val), "" );
- static_assert ( !(o3 < val), "" ); // equal
- static_assert ( (o3 < T(3)), "" );
-
- static_assert ( !(T(1) < o1), "" );
- static_assert ( !(T(1) < o2), "" ); // equal
- static_assert ( (T(1) < o3), "" );
- static_assert ( !(val < o2), "" );
- static_assert ( !(val < o3), "" ); // equal
- static_assert ( !(T(3) < o3), "" );
- }
-}
diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp
deleted file mode 100644
index ae2ff808fb2..00000000000
--- a/libcxx/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03, c++11, c++14
-// <optional>
-
-// template <class T> constexpr bool operator!=(const optional<T>& x, const T& v);
-// template <class T> constexpr bool operator!=(const T& v, const optional<T>& x);
-
-#include <optional>
-
-using std::optional;
-
-struct X
-{
- int i_;
-
- constexpr X(int i) : i_(i) {}
-};
-
-constexpr bool operator != ( const X &lhs, const X &rhs )
- { return lhs.i_ != rhs.i_ ; }
-
-int main()
-{
- {
- typedef X T;
- typedef optional<T> O;
-
- constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( (o1 != T(1)), "" );
- static_assert ( !(o2 != T(1)), "" );
- 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), "" );
- }
-}
OpenPOWER on IntegriCloud