Boost logo

Boost :

Subject: [boost] [type_traits] Most Unifying Proposal for operator names Was: Review Typetraits Extension.
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2011-03-20 04:00:51


Dear Frédéric, Operatorists, list,

on occasion of the current naming discussion on operator traits I
started a wiki page with an operator functor naming table that allows
for an overview over names of operators, functors (and related concept
names) across the standard and boost. I compared the name stems only,
independent of the question of a 'has_' or 'has_operator_' prefix.
Basically it's an extension of Frédéric's operator names table 1.7
from his docs, extended by proto and boost::operator names.

Comparing the names I tried to find "Most Unifying Proposals" for
names in column MUP:

https://svn.boost.org/trac/boost/wiki/Guidelines/Naming/Operators

Also I took a look at the current and new standard's functor class
templates from header <functional>. I wonder why all the functors only
use one template parameter, which restricts their use leaving out the
interesting cases of functors for mixed type overloaded operators.

template <class T> struct op_functor { ... }

instead of

template <class T, class U=T, class R=T> struct op_functor { ... }

Also I don't understand, why inheritence form binary_function<T,U,R>
is no longer declared, but instead of this, the redundant declaration
of all associated types for every functor. Does this codereplication
serve any purpose?

Regards,
Joachim

-- 
Interval Container Library [Boost.Icl]
http://www.joachim-faulhaber.de

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