[Boost-bugs] [Boost C++ Libraries] #13114: Multiple signatures for function

Subject: [Boost-bugs] [Boost C++ Libraries] #13114: Multiple signatures for function
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-07-10 18:09:48

#13114: Multiple signatures for function
 Reporter: stinkingmadgod@… | Owner: Douglas Gregor
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: function
  Version: Boost 1.63.0 | Severity: Not Applicable
 Keywords: |
 I am not familiar with boost, just wanted to suggest the possibility of
 having `function` take multiple signatures

 function<void (int), int (double)> f;

 This is compatible with `std::function`, but unknown feasibility for
 `boost::function` in its current form.

 The key idea is to recursively implement `operator()` from the argument

 template<typename Ret, typename... Args, typename... Fns>
 struct erasure_base<Ret (Args...), Fns...> : erasure_base<Fns...>
     virtual Ret operator()(Args&&...) = 0;
     using erasure_base<Fns...>::operator();

 Attached file is a proof-of-concept implementation of such functionality.

Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13114>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-07-10 18:14:07 UTC