Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / utilities / variant / variant.variant / variant_void.verify.cpp
blob106f8af0ecd3b919296578b9541bf3a2ac857243
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14
11 // <variant>
13 // template <class ...Types> class variant;
16 #include <variant>
17 #include <type_traits>
18 #include <string>
19 #include <cassert>
21 #include "test_macros.h"
22 #include "variant_test_helpers.h"
23 #include "test_convertible.h"
25 int main(int, char**)
27 // expected-error@variant:* 3 {{static assertion failed}}
28 std::variant<int, void> v; // expected-note {{requested here}}
29 std::variant<int, const void> v2; // expected-note {{requested here}}
30 std::variant<const volatile void, int> v3; // expected-note {{requested here}}
32 return 0;