diff options
Diffstat (limited to 'test/CXX/temp/temp.spec/temp.explicit/p12.cpp')
-rw-r--r-- | test/CXX/temp/temp.spec/temp.explicit/p12.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.spec/temp.explicit/p12.cpp b/test/CXX/temp/temp.spec/temp.explicit/p12.cpp new file mode 100644 index 000000000000..fdf4393d4385 --- /dev/null +++ b/test/CXX/temp/temp.spec/temp.explicit/p12.cpp @@ -0,0 +1,6 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +char* p = 0; +template<class T> T g(T x = &p) { return x; } +template int g<int>(int); // OK even though &p isn’t an int. + |