Antonio Cantarella
Antonio Cantarella

Reputation: 107

Is possible to write a trait to detect a friend class declaration?

I would like to know if it is possible to write a trait capable to detect a friend class declaration. I'm particularly interested in the case of forward declaration, like so:

struct Baz
{
   friend struct Foo; 
};

struct Foo {};

Please no Boost or other external libraries. The answer should stick either with the standard (C++17) or a custom trait.

Upvotes: 3

Views: 128

Answers (0)

Related Questions