Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/variadic-init2.C

raw
1 // { dg-do compile { target c++11 } }
2
3 struct MoveOnly {
4 MoveOnly() = default;
5 MoveOnly(MoveOnly const&) = delete;
6 MoveOnly(MoveOnly&&) = default;
7 };
8
9 struct StoresMoveOnly {
10 StoresMoveOnly() {}
11 ~StoresMoveOnly() = default;
12
13 MoveOnly value;
14 };
15
16 template <class ...Args> void test(Args... args) {
17 StoresMoveOnly s(args...);
18 }
19
20 int main() { test(); }