blob: 8a9e65c4e2e3d94356d9d33d33ab2b879566e094 [file] [log] [blame]
Douglas Gregor9f185072009-09-11 20:15:17 +00001// RUN: clang-cc -emit-llvm -triple i686-pc-linue-gnu -o %t %s &&
2// RUN: grep "define i32 @_ZNK4plusIillEclERKiRKl" %t | count 1
Douglas Gregoraba43bb2009-05-26 20:50:29 +00003
4template<typename T, typename U, typename Result>
5struct plus {
Douglas Gregord0e3daf2009-09-04 22:48:11 +00006 Result operator()(const T& t, const U& u) const;
Douglas Gregoraba43bb2009-05-26 20:50:29 +00007};
8
Douglas Gregord0e3daf2009-09-04 22:48:11 +00009template<typename T, typename U, typename Result>
10Result plus<T, U, Result>::operator()(const T& t, const U& u) const {
11 return t + u;
12}
13
Douglas Gregoraba43bb2009-05-26 20:50:29 +000014template struct plus<int, long, long>;