diff options
Diffstat (limited to 'libcxx/test/utilities/optional/optional.syn/optional_const_nullopt_t.fail.cpp')
-rw-r--r-- | libcxx/test/utilities/optional/optional.syn/optional_const_nullopt_t.fail.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libcxx/test/utilities/optional/optional.syn/optional_const_nullopt_t.fail.cpp b/libcxx/test/utilities/optional/optional.syn/optional_const_nullopt_t.fail.cpp index 82aa4c1220c..f6220bda69c 100644 --- a/libcxx/test/utilities/optional/optional.syn/optional_const_nullopt_t.fail.cpp +++ b/libcxx/test/utilities/optional/optional.syn/optional_const_nullopt_t.fail.cpp @@ -12,12 +12,16 @@ // A program that necessitates the instantiation of template optional for // (possibly cv-qualified) null_opt_t is ill-formed. -#include <optional> +#include <experimental/optional> int main() { #if _LIBCPP_STD_VER > 11 - std::optional<const std::nullopt_t> opt; + using std::experimental::optional; + using std::experimental::nullopt_t; + using std::experimental::nullopt; + + optional<const nullopt_t> opt; #else #error #endif // _LIBCPP_STD_VER > 11 |