summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/explicit-instantiation.cpp
blob: b33ba85cf6606e2d43cc069d87810a4e2a7edaca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: clang-cc -emit-llvm -triple i686-pc-linux-gnu -o %t %s
// RUN: grep "define i32 @_ZNK4plusIillEclERKiRKl" %t | count 1

template<typename T, typename U, typename Result>
struct plus {
  Result operator()(const T& t, const U& u) const;
};

template<typename T, typename U, typename Result>
Result plus<T, U, Result>::operator()(const T& t, const U& u) const {
  return t + u;
}

template struct plus<int, long, long>;
OpenPOWER on IntegriCloud