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

129 Views Asked by At

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.

0

There are 0 best solutions below