summaryrefslogtreecommitdiff
path: root/kythe/cxx/indexer/cxx/testdata/tvar_template/template_fn_spec.cc
blob: 845cf6c65f80054112bb48865b67b01d690f0bc5 (plain)
1
2
3
4
5
6
7
8
9
10
// Tests explicit specialization of function templates.
// Note that function templates do not support partial specialization.
//- @id defines/binding PrimaryTemplate
template <typename T> T id(T x) { return T(); }
//- @id defines/binding SpecTemplate
template <> int id(int x) { return x; }
//- SpecTemplate specializes TAppPTInt
//- TAppPTInt.node/kind tapp
//- TAppPTInt param.0 PrimaryTemplate
//- TAppPTInt param.1 vname("int#builtin",_,_,_,_)