Boost logo

Boost :

Subject: Re: [boost] Boost.Convert+Boost.Parameter
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-02-22 16:11:34

On Sun, Feb 22, 2009 at 12:39 PM, <Vladimir.Batov_at_[hidden]> wrote:
> > The keywords are decoupled.
> > ...
> > Did you read through the Boost.Parameter tutorial?
> OK, I admit before I only glanced over the docs a couple of times. I
> thought I got the idea. Obviously not. :-( Now I printed it out and set
> down reading. Now I see the registration is all by itself and not coupled
> with anything. That's good.
> So, convert() can take those parameters in. Given we do not know how many
> parameters there might be I'd suggest we set those parameters with
> operator(). Like
> convert<string, int>(str)(default_ = -1)(throw_ =
> false)(some_other_parameter_ = ...)
> Given, convert() does not know and does not understand
> "some_other_parameter_" somebody else will need to do something with it.
> Who would that be and what would it do? I presume we could come up with a
> Boost.Parameter-based manipulator analog... or... no, I admit I am out of
> ideas. How can all that work?

It would be nice if a function (for example convert) could understand
the parameters it is given, wouldn't it? :)

It seems like you want convert to be as generic as:

result convert( parameters )

which is almost as generic as:

result f( parameters )

This is really in the domain of programming languages, not an
interface expressed in C++.

Emil Dotchevski
Reverge Studios, Inc.

Boost list run by bdawes at, gregod at, cpdaniel at, john at