On February 14, 2018 4:04:12 PM EST, Zach Laine via Boost
On Wed, Feb 14, 2018 at 2:44 PM, P F
wrote: If there are advantages to using mp_assign, maybe this extra noise
few places is worth it. I still have no idea what the mp_assign advantages are though.
The point is to be able to get rid of `::` at the beginning in `BOOST_YAP_USER_UNARY_OPERATOR_MEMBER(logical_not, ::user_expr)`. If
user forgets those, you need to have a clear way to tell the user
to add them, because it may not be obvious from the compiler error without understanding the implementation details.
One way to solve this is to avoid it altogether by not passing a template, which you can try to utilize something like mp_assign.
Another possible solution may be to add a static_assert with a message like “you are passing a type instead of template, you may need to
in a the they need prepend
:: to the parameter to this macro". I think you can use function overloading to distinguish between a type and a template, but I am not sure.
Ah, I get it now, thanks.
I think I'd rather document better that the :: is required, as opposed to doing more template chicanery. This is both because I want to keep compile times low, and because I don't want to make something that might be brittle in ways I don't fully understand. I'm a metaprogrammer of only moderate skill.
You could prepend :: in the macro. -- Rob (Sent from my portable computation device.)