Re: Referring to a base class with template template parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Perfect!  That's exactly what I was looking for.  All of my "<B>" text
was turned into HTML bold tags, so the code in my original post (and the
pre-edit follow-up) was garbage.  Sorry for the confusion!

-Alex


Ian Lance Taylor-3 wrote:
> 
> 
> B refers to the instantiated class B<>, not the template B.  So you
> need to qualify it.  Is this code what you are after?
> 
> template <template <typename> class T>
> class A {
> public:
>    A(int) {}
> };
> 
> template <typename>
> class B : public A&lt;B&gt; {
> public:
>    B(int i)
>      : A< ::B>(i) {}
> };
> 
> (note the space required between "<" and "::" to avoid a digraph).
> 
> 

-- 
View this message in context: http://old.nabble.com/Referring-to-a-base-class-with-template-template-parameters-tp26249699p26256986.html
Sent from the gcc - Help mailing list archive at Nabble.com.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux