blob: b33ba85cf6606e2d43cc069d87810a4e2a7edaca [file] [log] [blame]
Mike Stump2a70e942009-11-16 18:06:39 +00001// RUN: clang-cc -emit-llvm -triple i686-pc-linux-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>;