diff options
author | Ville Voutilainen <ville.voutilainen@gmail.com> | 2018-05-13 13:36:12 +0300 |
---|---|---|
committer | Ville Voutilainen <ville@gcc.gnu.org> | 2018-05-13 13:36:12 +0300 |
commit | 456dbc72758c15b9ae2f1b8cc6c069e70f67947a (patch) | |
tree | 20c32898ea1bc400304db38ec09555738d0645b9 | |
parent | 2f2ebf951ba2f5f85c53213e0756756ce45bd58f (diff) | |
download | gcc-456dbc72758c15b9ae2f1b8cc6c069e70f67947a.zip gcc-456dbc72758c15b9ae2f1b8cc6c069e70f67947a.tar.gz gcc-456dbc72758c15b9ae2f1b8cc6c069e70f67947a.tar.bz2 |
re PR libstdc++/80165 (Constexpr tuple of variant doesn't work)
PR libstdc++/80165
* testsuite/20_util/variant/80165.cc: New.
From-SVN: r260209
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/20_util/variant/80165.cc | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 66b4593..f95630e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com> + + PR libstdc++/80165 + * testsuite/20_util/variant/80165.cc: New. + 2018-05-10 Jonathan Wakely <jwakely@redhat.com> * 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 0000000..add976c --- /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 <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}; +} |