Boost logo

Boost :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2006-03-06 13:04:17


I've been Boost.Parameter a bit by now and I have some usability
feedback. There is one thing that currently bugs be a bit, the type
defined by parameter::binding. All my uses so far have been of the form:

typedef typename
   boost::remove_reference<
     boost::remove_const<
       boost::parameter::binding<ArgPack,tag::something>::type
>::type
>::type
   something_t;

something_t s = args[something];

Or equivalent thereof. So every use I have I end up removing the ref and
const because I'm really interested in the original type, and hence want
to make a copy. Now I understand the rational outlined in "Eliminating
Copies"
<http://www.boost.org/libs/parameter/doc/html/index.html#eliminating-copies>.
But I think that isn't enough of a justification for dirtying up the
user interface, as above. I'd rather that the binding type where the
value type so that one would have:

typedef typename
   boost::parameter::binding<ArgPack,tag::something>::type
   something_t;

something_t s = args[something];

Having it that way one still has the option of more naturally using the
reference type as;

something_t const & q = args[something];

And possibly also providing the container standard binding::value_type,
and binding::const_reference.

--
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

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