summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/variadic-init2.C
blob: 8d5228c93cd29188f65c9a8e271f1986e3f44893 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do compile { target c++11 } }

struct MoveOnly {
  MoveOnly() = default;
  MoveOnly(MoveOnly const&) = delete;
  MoveOnly(MoveOnly&&) = default;
};

struct StoresMoveOnly {
  StoresMoveOnly() {}
  ~StoresMoveOnly() = default;
    
  MoveOnly value;
};

template <class ...Args> void test(Args... args) {
  StoresMoveOnly s(args...);
}

int main() { test(); }