Boost logo

Boost :

From: joel de guzman (djowel_at_[hidden])
Date: 2001-11-29 16:11:22


----- Original Message -----
From: "Aleksey Gurtovoy" :

> David Abrahams wrote:
> > as long as we're tinkering with names, consider "value_t" or
> > "value_type":
> >
> > template <typename T, T x>
> > struct value_t
> > {
> > static T const value = x;
> > };
> >
> > template <int x>
> > struct int_t : value_t<int, x> {};
> >
> > Did somebody already suggest that?
>
> Well, I thought about adding a more general integral constant wrapper to
> MPL, and implementing 'int_t' in terms of it, but I was going to call it
> 'integral_t' :). BTW, I agree with the point others made about '_t'
prefix,
> so my current intention is to name them 'intergal_c' and 'int_c'
> respectively ("c" for "constant"). What do you think?

xxx_c is nice. Someone also suggested xxx_v. Or how about xxx_s
("s" as in static)? Hmmm, in xxx_c, "c" may also stand for "compile time".

Whatever, my wish is that it is short and general and makes sense in
the functional-metaprogramming domain.

--Joel


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