On 1/20/2016 12:26 PM, Christof Warlich wrote:
> Am Mittwoch, 20. Januar 2016 12:06:33 UTC+1 schrieb Alf P.
> Steinbach:
>> Oh, sorry, it's just a template parameter of the base class type.
>
> Yeah, making Derived a friend did not do the trick. So there is
> really no way except of making Inner public?
This compiles nicely with g++ 4.8.2 and MSVC 2015:
template<typename T> class B;
class A {
class Inner {};
friend class Derived;
};
template<typename T> class B {};
class Derived: public B<A::Inner> {};
auto main() -> int
{
Derived x;
(void) x;
}
>> Still, it looks a bit weird, like a solution to some other
>> unmentioned problem?
>
> Well, I'm extending std::thread to accept an additional parameter,
> i.e. POSIX attributes, and B:<Inner> in reality is a member from the
> std namespace that I cannot change.
Ah.