annotate gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv12.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // PR c++/80767
kono
parents:
diff changeset
2 // { dg-do compile { target c++11 } }
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
3 // { dg-additional-options "-Wno-return-type" }
111
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 template <typename T, typename U = T> struct A { using type = U; };
kono
parents:
diff changeset
6 template <typename F, typename... G> struct B : B<F>::type, B<G...>::type {
kono
parents:
diff changeset
7 using type = B;
kono
parents:
diff changeset
8 using B<F>::type::operator();
kono
parents:
diff changeset
9 };
kono
parents:
diff changeset
10 template <typename F> struct B<F> { using type = F; };
kono
parents:
diff changeset
11 struct {
kono
parents:
diff changeset
12 template <typename... F,
kono
parents:
diff changeset
13 typename Overload = typename B<typename A<F>::type...>::type>
kono
parents:
diff changeset
14 Overload operator()(F...){}
kono
parents:
diff changeset
15 } a;
kono
parents:
diff changeset
16 int main() {
kono
parents:
diff changeset
17 auto f = a([](int) {}, [](float) {});
kono
parents:
diff changeset
18 f({});
kono
parents:
diff changeset
19 }