|
Boost : |
From: Kevin Cline (kcline_at_[hidden])
Date: 2001-11-28 23:09:57
Andrei Alexandrescu writes:
> From: "David Abrahams" <david.abrahams_at_[hidden]>
> > 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?
>
> I fear these will engender confusion because they are similar to size_t and
> ptrdiff_t, types that don't have a generic programming conotation. So
> someone seeing int_t might think "hmmm, this must be some platform specific
> integral type..."
I agree with Andrei here. The only reasonable alternative I've heard so far
is "unique_type"; it would be even better if it could be overloaded so we could have unique_type<int N> and unique_type<typename T>.
-- Kevin Cline
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk