freebsd-dev/test/CodeGenCXX/explicit-instantiation.cpp
2009-06-02 17:58:47 +00:00

12 lines
291 B
C++

// RUN: clang-cc -emit-llvm -femit-all-decls -o %t %s &&
// RUN: grep "_ZNK4plusIillEclERKiRKl" %t | count 1
template<typename T, typename U, typename Result>
struct plus {
Result operator()(const T& t, const U& u) const {
return t + u;
}
};
template struct plus<int, long, long>;