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 //===----------------------------------------------------------------------===//
8
9 // UNSUPPORTED: c++03, c++11, c++14
10
11 // <variant>
12
13 // template <class ...Types> class variant;
14
15
16 #include <variant>
17 #include <type_traits>
18 #include <string>
19 #include <cassert>
20
21 #include "test_macros.h"
22 #include "variant_test_helpers.h"
23 #include "test_convertible.h"
24
main(int,char **)25 int main(int, char**)
26 {
27 // expected-error-re@variant:* 3 {{{{(static_assert|static assertion)}} failed}}
28 std::variant<int, int[]> v; // expected-note {{requested here}}
29 std::variant<int, int[42]> v2; // expected-note {{requested here}}
30 std::variant<int, int[][42]> v3; // expected-note {{requested here}}
31
32 return 0;
33 }
34