freebsd-nq/test/SemaTemplate/instantiate-overloaded-arrow.cpp

22 lines
231 B
C++
Raw Normal View History

2010-01-01 10:34:51 +00:00
// RUN: %clang_cc1 -fsyntax-only -verify %s
// expected-no-diagnostics
2009-11-18 14:59:57 +00:00
// PR5488
struct X {
int x;
};
struct Iter {
X* operator->();
};
template <typename T>
void Foo() {
(void)Iter()->x;
}
void Func() {
Foo<int>();
}