Boost logo

Boost :

Subject: Re: [boost] determine first arg of callable
From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2013-05-15 10:38:30


On 15 May 2013 15:07, Oliver Kowalke wrote:
> The only remaining issue are objects created by bind() and passed to the
> ctor - I thought overloading X() with the type returned by bind() should
> work?!

As I already said in the first reply in this thread, in the general
case there is no such thing as "the argument type" of a callable
object, and in the specific case of boost::bind the call wrapper it
returns is a template that just forwards its arguments to the target
object. How do you tell the argument type of a function template?

If your design requires something that is unknowable then the design is flawed.

Requiring callable objects to have a single, fixed argument_type is an
outdated C++98 notion incompatible with forwarding call wrappers like
the one returned by boost::bind.


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