Boost logo

Boost :

From: Aleksey Gurtovoy (alexy_at_[hidden])
Date: 2001-11-29 15:25:25


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?

---
Aleksey

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