Boost logo

Boost :

Subject: Re: [boost] review request: addition to type_traits library ofhas_operator_xxx
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2010-11-17 15:32:36


> Those names are not consistent with boost::has_new_operator.  That is, you need to rename them like the following for consistency:
>
>   s/has_operator_\(.+\)/has_\1_operator/
>
> The result won't be perfect.  For example, "has_operator_divides" should be renamed "has_division_operator."
>
> Renaming "has_new_operator" seems more appropriate, however.  "has_operator_new" puts "operator" and "new" in the right order as the query is for operator new, not the new operator.
>
> The same discussion applies to the other traits.

The question of naming has already been discussed here :
http://thread.gmane.org/gmane.comp.lib.boost.devel/194625
At that time, we preferred has_operator_xxx to has_xxx_operator.
I agree that the whole type_traits library would need more consistency
but this would break existing code.
If this is not an issue, renaming should be rather straitforward
providing we can all agree on new names.

Frédéric


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