mercredi 27 juillet 2016

How do I declare a member template class an friend of the enclosing class?

I have some class

template<typename Fun, typename Arg>
  class TestBuilder
  {
    template<typename Int>
      class Helper
      {};
  };

How do I make Helper a friend of TestBuilder? I tried:

template<typename Int>
  friend class Helper;

but that just makes friends of namespace scope Helper classes friends of TestBuilder

Aucun commentaire:

Enregistrer un commentaire