aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/class-deduction90.C
blob: 8b93193c7b0cf23172c4c5825fc184a728f93868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/86439
// { dg-do compile { target c++17 } }

struct less { };
struct allocator { };

template<class T, class U = less, class V = allocator>
struct A {
  A(T, U);
  A(T, V);
};

template<class T, class U = less>
A(T, U) -> A<T>;

A a(0, {}); // { dg-error "ambiguous" }