|
Boost : |
From: David A. Greene (greened_at_[hidden])
Date: 2001-11-29 17:43:16
Eric Friedman wrote:
> *_wrapper seems like a step in the right direction for the reasons
> Matthew articulated, but a "wrapper" connotes (to me at least) some kind
> of functionality being added by the wrapper to the existing type --
> which is certainly not what's happening.
Good point.
> So what about *_tag (type_tag, int_tag, bool_tag, ...)?
>
> It's shorter, yes, but it also seems to better connote what it used for.
I kind of like this suggestion. It gets at the fact that
type2type<type> != type and it suggests a mapping operation is
involved, with *_tag being the "index" or "iterator" where
"dereferencing" *_tag (via ::type, ::value, etc.) returns
the thing mapped. It also suggests a lightweight "thing"
that represents a heavier object (i.e. when used for static
dispatch).
"Tag" also implies the uniqueness which I was trying to
convey with unique_type<N>.
It unfortunately clashes with iterator_tag, but maybe those
aren't the best-named things either.
-Dave
-- "Some little people have music in them, but Fats, he was all music, and you know how big he was." -- James P. Johnson
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk