
3 May
2011
3 May
'11
1:40 a.m.
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