Boost logo

Boost :

From: Hans Dembinski (hans.dembinski_at_[hidden])
Date: 2020-09-14 10:22:49


> On 14. Sep 2020, at 11:04, Alexander Grund via Boost <boost_at_[hidden]> wrote:
>
> I'm not a big fan of the NTTP used especially as e.g. for overloaded operator() the result is ambigious. What was the reason for choosing it?
>
> Besides that as Peter said the tuple/MPL list of arguments is a good idea. Another good idea is improved handling of member functions. E.g. in C++11 and up you don't only have const and noexcept but also rvalue and lvalue specifiers. So that could be added too

AFAIU Boost.CallableTraits can do all this and more.

https://www.boost.org/doc/libs/1_74_0/libs/callable_traits/doc/html/callable_traits/reference.html#callable_traits.reference.ref_args
https://www.boost.org/doc/libs/1_74_0/libs/callable_traits/doc/html/callable_traits/reference.html#callable_traits.reference.ref_function_type
https://www.boost.org/doc/libs/1_74_0/libs/callable_traits/doc/html/callable_traits/reference.html#callable_traits.reference.ref_return_type

The args are returned as a std::tuple, which is Boost.Mp11 compatible.


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