
2011/3/20 Vicente Botet <vicente.botet@wanadoo.fr>:
Joachim Faulhaber wrote:
2011/3/19 Frédéric Bron <frederic.bron@m4x.org>:
Maybe the set of functions should be something like
is_callable<plus, LeftOperandType, RightOperandType>
This is interesting,
yes, I like it
however it would have to be something like: ::boost::is_callable<::boost::type_traits::operators::plus, LHS, RHS>
ideally
boost::is_callable<std::plus, Left, Right>
but std::op_functors seem to be restricted to singly typed functors, which I don't understand,
I don't see op_functors in the standard.
What I mean by "op_functors" are function objects that wrap operators. 20.8 Function objects [1] e.g. // 20.8.4, arithmetic operations: template <class T> struct plus;
What do you mean by "restricted to singly typed functors"?
And they are template structs parameterized with a single type T instead of e.g. template <class T, class U=T, class R=T> struct plus; all three types: Lhs argument type T, rhs argument type U and result type R. Best, Joachim [1] Document n3242=11-0012, Working Draft, Standard for Programming Language C++ -- Interval Container Library [Boost.Icl] http://www.joachim-faulhaber.de