blob: b47b3758622dd0c6aa2b0d317480967d22e86b8e [file] [log] [blame]
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00001// RUN: clang-cc -emit-llvm -triple i686-pc-linue-gnu -o %t %s
Douglas Gregor9f185072009-09-11 20:15:17 +00002// 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>;