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

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;
}