180e66ac1SEric Fiselier // -*- C++ -*- 280e66ac1SEric Fiselier //===----------------------------------------------------------------------===// 380e66ac1SEric Fiselier // 457b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 557b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 657b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 780e66ac1SEric Fiselier // 880e66ac1SEric Fiselier //===----------------------------------------------------------------------===// 980e66ac1SEric Fiselier 1080e66ac1SEric Fiselier // UNSUPPORTED: c++98, c++03, c++11, c++14 1180e66ac1SEric Fiselier 1280e66ac1SEric Fiselier // <variant> 1380e66ac1SEric Fiselier 1480e66ac1SEric Fiselier // template <class ...Types> class variant; 1580e66ac1SEric Fiselier 1680e66ac1SEric Fiselier #include <variant> 1780e66ac1SEric Fiselier 1880e66ac1SEric Fiselier #include "test_macros.h" 19*cc89063bSNico Weber #include "variant_test_helpers.h" 2080e66ac1SEric Fiselier 212df59c50SJF Bastien int main(int, char**) 2280e66ac1SEric Fiselier { 2380e66ac1SEric Fiselier // expected-error@variant:* 3 {{static_assert failed}} 2480e66ac1SEric Fiselier std::variant<int, int&> v; // expected-note {{requested here}} 250d3d8de0SEric Fiselier std::variant<int, const int &> v2; // expected-note {{requested here}} 2680e66ac1SEric Fiselier std::variant<int, int&&> v3; // expected-note {{requested here}} 272df59c50SJF Bastien 282df59c50SJF Bastien return 0; 2980e66ac1SEric Fiselier } 30