1 // -*- C++ -*- 2 //===----------------------------------------------------------------------===// 3 // 4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 // See https://llvm.org/LICENSE.txt for license information. 6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 // 8 //===----------------------------------------------------------------------===// 9 10 // UNSUPPORTED: c++03, c++11, c++14 11 12 // <variant> 13 14 // template <class ...Types> class variant; 15 16 17 #include <variant> 18 #include <type_traits> 19 #include <string> 20 #include <cassert> 21 22 #include "test_macros.h" 23 #include "variant_test_helpers.h" 24 #include "test_convertible.h" 25 main(int,char **)26int main(int, char**) 27 { 28 // expected-error@variant:* 3 {{static_assert failed}} 29 std::variant<int, int[]> v; // expected-note {{requested here}} 30 std::variant<int, int[42]> v2; // expected-note {{requested here}} 31 std::variant<int, int[][42]> v3; // expected-note {{requested here}} 32 33 return 0; 34 } 35