aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1y/parameter-pack-1.C
blob: 27a6bf9dedb45daea960eda3054decae819d506b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR c++/68965
// { dg-do compile { target c++14 } }
// { dg-options "-Wall -Wextra" }

auto count = [](auto&&... xs)
{
    return sizeof...(xs);
};

struct count_struct
{
    template<typename... Ts>
    auto operator()(Ts&&... xs)
    {
        return sizeof...(xs);
    }
};

int main()
{
    count(1,2,3);
    count_struct{}(1,2,3);
}