2010-03-14 02:23:07 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm -triple i686-pc-linux-gnu -o - %s | FileCheck %s
|
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;
|
|
|
|
}
|
|
|
|
|
2010-03-14 02:23:07 +08:00
|
|
|
// CHECK: define weak_odr i32 @_ZNK4plusIillEclERKiRKl
|
2009-05-27 04:50:29 +08:00
|
|
|
template struct plus<int, long, long>;
|