gcc/libstdc++-v3/testsuite/20_util/variant/80165.cc
Ville Voutilainen 456dbc7275 re PR libstdc++/80165 (Constexpr tuple of variant doesn't work)
PR libstdc++/80165
* testsuite/20_util/variant/80165.cc: New.

From-SVN: r260209
2018-05-13 13:36:12 +03:00

13 lines
349 B
C++

// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
#include <tuple>
#include <variant>
int main() {
using variant_t = std::variant<short, int, long>;
constexpr auto variant_v = variant_t{std::in_place_index_t<0>{}, short{}};
constexpr auto tuple = std::make_tuple(variant_v);
constexpr std::tuple tuple_v{variant_v};
}