1// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2
3// Test default template arguments for function templates.
4template<typename T = int>
5void f0();
6
7template<typename T>
8void f0();
9
10void g0() {
11  f0(); // okay!
12}
13
14template<typename T, int N = T::value>
15int &f1(T);
16
17float &f1(...);
18
19struct HasValue {
20  static const int value = 17;
21};
22
23void g1() {
24  float &fr = f1(15);
25  int &ir = f1(HasValue());
26}
27