Topic: Template template template parameters


Author: "Andrei Alexandrescu" <andrewalex@hotmail.com>
Date: 2000/06/09
Raw View
Is this possible? IOW, are template template parameters recursive?

// Warning - professional driver on closed track
// Do not try this with your car

template <template <template <class> class> class T>
class Weird
{
    ...
};

The Comeau compiler likes it, at least the trivial test above.


Andrei


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: comeau@panix.com (Greg Comeau)
Date: 2000/06/09
Raw View
In article <sjvsrj5hh51185@news.supernews.com>,
Andrei Alexandrescu <andrewalex@hotmail.com> wrote:
>Is this possible? IOW, are template template parameters recursive?
>
>// Warning - professional driver on closed track
>// Do not try this with your car
>
>template <template <template <class> class> class T>
>class Weird
>{
>    ...
>};
>
>The Comeau compiler likes it, at least the trivial test above.

I'm curious about your intended use of this?

- Greg
--
Comeau Computing, Producers of Comeau C/C++ 4.2.42 (4.2.43 BETA starting)
Try Comeau C++ online at http://www.comeaucomputing.com/tryitout
Email: comeau@comeaucomputing.com / WEB: http://www.comeaucomputing.com

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]