
AMDG On 4/30/25 4:15 PM, Jean-Louis Leroy via Boost wrote:
Hi JoaquĆn,
* Instead of BOOST_OPENMETHOD(poke, (std::ostream&,virtual_ptr<Animal>), void), consider the possibility of using BOOST_OPENMETHOD(poke, void(std::ostream&, virtual_ptr<Animal>)).
I tried since you last suggested this. Couldn't make it work. The macro generates something like:
auto poke(std::ostream& a, virtual_ptr<Animal> b) -> void { method<poke_method(std::ostream& a, virtual_ptr<Animal> b)>::fn(a, b); }
There is no way to peel off the `void` from the signature with the syntax you suggest.
It doesn't need to be peeled off by the macro. You're only using it as a template parameter, so you can just pass the whole signature as a function type. In Christ, Steven Watanabe