mirror of
https://github.com/github/codeql.git
synced 2026-08-03 00:43:00 +02:00
30 lines
346 B
C++
30 lines
346 B
C++
template <typename T>
|
|
class SelfFriendlyTemplate
|
|
{
|
|
friend class SelfFriendlyTemplate<T>;
|
|
};
|
|
|
|
class OuterC
|
|
{
|
|
class InnerC
|
|
{
|
|
friend class Foo;
|
|
};
|
|
friend class Foo;
|
|
};
|
|
|
|
class OuterF
|
|
{
|
|
friend void foo();
|
|
class InnerF
|
|
{
|
|
friend void foo();
|
|
};
|
|
};
|
|
|
|
int main()
|
|
{
|
|
SelfFriendlyTemplate<int> i;
|
|
SelfFriendlyTemplate<float> f;
|
|
}
|