When clang adds argument dependent lookup candidates, it can perform template instantiation. For example, it can instantiate a templated friend function and register it in the enclosing namespace's lookup table. Fixes https://llvm.org/bugs/show_bug.cgi?id=24954 Reviewed by Richard Smith. llvm-svn: 263634
31 lines
613 B
C++
31 lines
613 B
C++
namespace B {
|
|
|
|
template <class _CharT>
|
|
struct basic_ostream {
|
|
basic_ostream& operator<<(basic_ostream& (*__pf)());
|
|
};
|
|
|
|
|
|
template <class _CharT> basic_ostream<_CharT>&
|
|
endl();
|
|
|
|
struct S1 {
|
|
template <class _CharT> friend void
|
|
operator<<(basic_ostream<_CharT>& __os, const S1& __x);
|
|
};
|
|
|
|
S1 setw(int __n);
|
|
|
|
template <class _CharT> class S2;
|
|
|
|
template <class _CharT> void
|
|
operator<<(basic_ostream<_CharT>& __os, const S2<_CharT>& __x);
|
|
|
|
template <class _CharT>
|
|
struct S2 {
|
|
template <class _Cp> friend void
|
|
operator<<(basic_ostream<_Cp>& __os, const S2<_Cp>& __x);
|
|
};
|
|
|
|
}
|