PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / noexcept33.C
blobc5a03de38dd1984c1bafbbe52a9b2f33968b50c8
1 // PR c++/86378
2 // { dg-do compile { target c++11 } }
4 struct Pepper {};
5 struct Apple { Apple(int) {} };
7 struct Combination : Apple, Pepper
9   Combination(Pepper p, Apple a)
10     : Apple(a), Pepper(p)
11   {}
14 struct MyCombination
16   using Spice = Pepper;
17   using Fruit = Apple;
19   Combination combination;
21   template<typename T>
22   constexpr MyCombination(T&& t)
23   noexcept(noexcept(Combination(Spice(), Fruit(t))))
24     : combination(Spice(), Fruit(t))
25   {}
28 MyCombination obj(Apple(4));