Boost logo

Boost :

Subject: Re: [boost] [BOOST CORE C++ Feature] the super or base keyword for C++
From: Robert Kawulak (robert.kawulak_at_[hidden])
Date: 2011-05-02 21:40:06


> From: Marsh Ray
> What about:
>
> template <
> size_t _Nb,
> base = _Base_bitset
> <
> ((_Nb) < 1
> ? 0
> : ((_Nb) + numeric_limits<unsigned long>::digits - 1)
> / numeric_limits<unsigned long>::digits)
> >
> >
> class bitset : base
> {
> bitset(size_t n) : base(n) { }
> };

I assume you mean "typename base = _Base_bitset"?
The trick is nice, but another disadvantage is that it won't work with CRTP.

Best regards,
RK


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk