Boost logo

Boost :

Subject: Re: [boost] [functional] adding overload
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2012-01-16 09:06:46

On Sun, Jan 15, 2012 at 9:06 PM, Nathan Ridge <zeratul976_at_[hidden]> wrote:
>> During Boost.Local review, it was proposed to move the overload
>> template out of Local and in Boost.Functional. What would the best
>> name for it?
>> 1) boost::overload_function (my preference)
>> 2) boost::overloaded_function
>> 3) boost::function_overload
>> 4) boost::functional::overload (Boost.Functional seems to use boost::
>> directly and not boost::functional-- to mimic C++11 ).
> I like boost::functional::overload. You can then add a convenience
> function make_overload() with creates one without having to specify

Yes, I will add boost::functional::make_overload as well.

> the template parameters, and it will be at once intuitive-sounding
> and consistent with Boost naming conventions.

Reading the Functional docs:
``The header functional.hpp provides enhancements to the function
object adapters specified in the C++ Standard Library (sections
20.3.5, through to 20.3.8). // (1)
Using these adapters should be pretty much the same as using the
standard function object adapters; the only differences are that you
need to write boost:: instead of std::, and that you will get fewer

Now boost/functional/overload.hpp instead will not match anything that
is in the C++ Standard Library... is that an issue for adding overload
to functional?

I don't think so because overload is still within Functional's stated purpose:
``The Boost.Function library contains a family of class templates that
are function object wrappers.''

Plus overload will not be in the functional.hpp header so (1) will
still be true for stuff that is in functional.hpp.

However, I'd like Functional's authors to comment if they have any
concern with adding overload to Functional.


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