
On Mon, Sep 26, 2011 at 5:04 PM, Christian Holmquist <c.holmquist@gmail.com> wrote:
Is this really the fault of clamp() though?
No, but clamp can avoid exposing this inherited problem, just as std::min/std::max does.
min and max have two 'equivalent' parameters. clamp doesn't, it has two limits and another argument. The return type is clear, it's the type of the first argument, that's not the case for min and max. So I don't think you can use that as an argument.
The same 'mistake' can easily be made in normal code.
Yes, and it is causing trouble. We can't go back and change the rules for implicit conversions between native types, but when there is a possibility to get rid of the legacy I think one should opt to do so.
Olaf
Christian
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost