Debian Codegraph @

libstdc++-v3/testsuite/20_util/any/102894.cc

raw
1 // { dg-do compile { target c++17 } }
2 #include <any>
3
4 template<typename T, typename = void>
5 struct can_make_any
6 : std::false_type
7 { };
8
9 template<typename T>
10 struct can_make_any<T, std::void_t<decltype(std::make_any<T>())>>
11 : std::true_type
12 { };
13
14 struct move_only
15 {
16 move_only() = default;
17 move_only(move_only&&) = default;
18 };
19
20 static_assert( ! can_make_any<move_only>::value ); // PR libstdc++/102894