summaryrefslogtreecommitdiff
path: root/clang/test/CXX/temp/temp.spec/temp.inst/p11.cpp
blob: 818407102cfde54c102433d428a51c004baaf801 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1 -verify -emit-llvm-only %s

// rdar://problem/7838962
namespace test0 {
  template<typename T> unsigned f0() {
    return T::MaxSize; // expected-error {{'int' cannot be used prior to '::'}}
  };
  template<typename T> struct A {
    void Allocate(unsigned Alignment
                    = f0<T>()) // expected-note {{in instantiation}}
    {}
  };
  void f1(A<int> x) { x.Allocate(); }
  
}