Boost logo

Boost :

Subject: Re: [boost] Boost.Conversion: functors namming
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-05-23 18:15:02

TONGARI wrote:
> 2011/5/15 Vicente BOTET <vicente.botet_at_[hidden]>
>> Hi,
>> during the Boost.Convert after review discussion there were some
>> proposals
>> to use Boost.Phoenix to build the functors.
>> My question is what should be the name of the function that builds the
>> functor. Some possibilities:
>> short s=1;
>> long l=3;
>> using boost::phoenix::placeholders::_1;
>> A- Use a different name: make_converter_to?
>> s=boost::make_converter_to(*short*)(_1)(l) ;
>> B- Use the same name in a different namespace. What about using "fp" as
>> namespace (functional programming).
>> s=boost::conversion::fp::convert_to(*short*)(_1)(l) ;
> Proto uses a separate namespace boost::proto::functional for such, so I
> think it's OK for Convert as well, while 'sp' is being too succinct, I
> think
> it'd be better to leave such tiny naming for the users themselves.
> If 'functional' is too long, maybe 'lazy' is a good choice...If this is
> your
> decision.

Yes functional will be better than fp.

> C- Use the same name in the same namespace and use SFINAE/enable_if to
> select the correct implementation depending on the parameter.

Maybe it's just a simple overloading without SFINAE. But this may imply that
it's tied to Phoenix actor...

Yes, this is a major drawback.


View this message in context:
Sent from the Boost - Dev mailing list archive at

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