mirror of git://gcc.gnu.org/git/gcc.git
re PR libstdc++/80165 (Constexpr tuple of variant doesn't work)
PR libstdc++/80165 * testsuite/20_util/variant/80165.cc: New. From-SVN: r260209
This commit is contained in:
parent
2f2ebf951b
commit
456dbc7275
|
|
@ -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>
|
2018-05-10 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
* doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
|
* doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
|
||||||
|
|
|
||||||
|
|
@ -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};
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue