From 456dbc72758c15b9ae2f1b8cc6c069e70f67947a Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Sun, 13 May 2018 13:36:12 +0300 Subject: [PATCH] re PR libstdc++/80165 (Constexpr tuple of variant doesn't work) PR libstdc++/80165 * testsuite/20_util/variant/80165.cc: New. From-SVN: r260209 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/testsuite/20_util/variant/80165.cc | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 libstdc++-v3/testsuite/20_util/variant/80165.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 66b45931b93..f95630e8c5e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2018-05-13 Ville Voutilainen + + PR libstdc++/80165 + * testsuite/20_util/variant/80165.cc: New. + 2018-05-10 Jonathan Wakely * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer. diff --git a/libstdc++-v3/testsuite/20_util/variant/80165.cc b/libstdc++-v3/testsuite/20_util/variant/80165.cc new file mode 100644 index 00000000000..add976c7256 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/variant/80165.cc @@ -0,0 +1,12 @@ +// { dg-options "-std=gnu++17" } +// { dg-do compile { target c++17 } } + +#include +#include + +int main() { + using variant_t = std::variant; + 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}; +} -- 2.30.2