blob: 24d1a67392290b89382dd0729150793c44de7e7f [file] [log] [blame]
Douglas Gregor8f51a4f2010-03-13 18:23:07 +00001// RUN: %clang_cc1 -emit-llvm -triple i686-pc-linux-gnu -o - %s | FileCheck %s
Douglas Gregoraba43bb2009-05-26 20:50:29 +00002
3template<typename T, typename U, typename Result>
4struct plus {
Douglas Gregord0e3daf2009-09-04 22:48:11 +00005 Result operator()(const T& t, const U& u) const;
Douglas Gregoraba43bb2009-05-26 20:50:29 +00006};
7
Douglas Gregord0e3daf2009-09-04 22:48:11 +00008template<typename T, typename U, typename Result>
9Result plus<T, U, Result>::operator()(const T& t, const U& u) const {
10 return t + u;
11}
12
Douglas Gregor8f51a4f2010-03-13 18:23:07 +000013// CHECK: define weak_odr i32 @_ZNK4plusIillEclERKiRKl
Douglas Gregoraba43bb2009-05-26 20:50:29 +000014template struct plus<int, long, long>;