> -----Original Message----- > From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin Sebor > Sent: Tuesday, June 24, 2008 5:11 PM > To: [email protected] > Subject: Re: Some internal aliases for __rw_integral_constant? > > Eric Lemings wrote: > > > > Propose adding the following defs (or something similar) to > > <rw/_meta_help.h> primarily for our own convenience: > > > > template <bool _Bool> > > class __rw_bool_const: public __rw_integral_constant<bool, > _Bool> {}; > > I was going to suggest the same thing this morning when I noticed > how pervasive __rw_integral_constant<bool, _Bool> seems to be in > traits definitions (I count 41 occurrences) and thinking that it > would make them less verbose. (With a different spelling of _Bool > to avoid potential clashes with the C99 name.)
Good point. > > I didn't because the only beneficiaries of the change would be us > (a fairly small notational convenience) and I wasn't sure the cost > in terms of the added complexity and compilation time was worth it. > I contemplated suggesting a macro for the same purpose instead but > decided against it on the assumption that it probably wouldn't be > very popular ;-) But now that the cat's out of the bag and you're > asking about alternatives let me throw it out there: > > #define _RWSTD_BOOL_CONST(B) _RW::__rw_integral_constant<bool, B> > > Usage: > > _RW::__rw_bool_const<bool, false> > vs > _RWSTD_BOOL_CONST (false) > Looks good to me. I'll just add _RWSTD_BOOL_CONST for now. Brad.
