|
Boost : |
Subject: Re: [boost] [BOOST CORE C++ Feature] The super or base keyword for C++
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2011-05-02 17:38:11
2011/4/29 Max Hölzer <max.hoelzer_at_[hidden]>:
>
> Adding a template class superable would avoid one to write the explicit base or
> super class name.
>
Unfortunately, this breaks down once you get to templates:
template <typename T>
class Foo : superable<typename Bar<T>::type> {
// the base is dependant, so you still have to
typedef typename superable<typename Bar<T>::type>::super super;
};
So IMHO the question is whether
class C : boost::superable<B>
{
is really superior to
class C : B
{
typedef B super;
and I'd have to say no.
~ Scott
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk