2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm -triple i686-pc-linux-gnu -o %t %s
|
2009-09-12 04:15:17 +08:00
|
|
|
// RUN: grep "define i32 @_ZNK4plusIillEclERKiRKl" %t | count 1
|
2009-05-27 04:50:29 +08:00
|
|
|
|
|
|
|
template<typename T, typename U, typename Result>
|
|
|
|
struct plus {
|
2009-09-05 06:48:11 +08:00
|
|
|
Result operator()(const T& t, const U& u) const;
|
2009-05-27 04:50:29 +08:00
|
|
|
};
|
|
|
|
|
2009-09-05 06:48:11 +08:00
|
|
|
template<typename T, typename U, typename Result>
|
|
|
|
Result plus<T, U, Result>::operator()(const T& t, const U& u) const {
|
|
|
|
return t + u;
|
|
|
|
}
|
|
|
|
|
2009-05-27 04:50:29 +08:00
|
|
|
template struct plus<int, long, long>;
|