aboutsummaryrefslogtreecommitdiff
path: root/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp
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.object/optional_requires_destructible_object.fail.cpp
parent6ee4001cc957acac39181b68193e1414c3163698 (diff)
Revert Add <optional>. Will recommit with better commit message
llvm-svn: 283978
Diffstat (limited to 'libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp')
-rw-r--r--libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp b/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp
deleted file mode 100644
index 8a2c77af0ec1..000000000000
--- a/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp
+++ /dev/null
@@ -1,50 +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>
-
-// T shall be an object type and shall satisfy the requirements of Destructible
-
-#include <optional>
-
-using std::optional;
-
-struct X
-{
-private:
- ~X() {}
-};
-
-int main()
-{
- using std::optional;
- {
- // expected-error@optional:* 2 {{static_assert failed "instantiation of optional with a reference type is ill-formed}}
- optional<int&> opt1;
- optional<int&&> opt2;
- }
- {
- // expected-error@optional:* {{static_assert failed "instantiation of optional with a non-destructible type is ill-formed"}}
- optional<X> opt3;
- }
- {
- // expected-error@optional:* {{static_assert failed "instantiation of optional with a non-object type is undefined behavior"}}
- // expected-error@optional:* {{static_assert failed "instantiation of optional with a non-destructible type is ill-formed}}
- optional<void()> opt4;
- }
- {
- // expected-error@optional:* {{static_assert failed "instantiation of optional with a non-object type is undefined behavior"}}
- // expected-error@optional:* {{static_assert failed "instantiation of optional with a non-destructible type is ill-formed}}
- // expected-error@optional:* 1+ {{cannot form a reference to 'void'}}
- optional<const void> opt4;
- }
- // FIXME these are garbage diagnostics that Clang should not produce
- // expected-error@optional:* 0+ {{is not a base class}}
-}