Debian Codegraph @

libstdc++-v3/testsuite/20_util/any/cons/101034.cc

raw
1 // { dg-do compile { target c++17 } }
2 // PR libstdc++/101034 - wrong constraint in std::any's constructor
3
4 #include <any>
5
6 struct S {
7 S(std::initializer_list<int>&, int) {}
8 };
9
10 std::any a(std::in_place_type<S>, {0}, 0);
11 S& s = a.emplace<S>({0}, 0);