Files
codeql/cpp/ql/test/library-tests/locations/calls/holder.cpp
2018-08-02 17:53:23 +01:00

21 lines
292 B
C++

template <class T>
class Holder {
T myT;
public:
Holder() {}
Holder(const Holder<T> &other) {
myT = other.myT;
}
};
template <class T>
Holder<T> operator+(Holder<T> h1, Holder<T> h2) {
return Holder<T>();
}
void test() {
Holder<int> h1;
Holder<int> h2 = Holder<int>();
h1 + h2;
}