Boost logo

Boost :

Subject: Re: [boost] [Review] Boost.Type Traits Extension ending tomorrow
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-03-20 08:56:35


Joachim Faulhaber wrote:
>
> 2011/3/20 Vicente Botet <vicente.botet_at_[hidden]>:
> >
> > Joachim Faulhaber wrote:
> >>
> >> 2011/3/19 Frédéric Bron <frederic.bron_at_[hidden]>:
> >> >> 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.
>
>

Oh, I see.

This extension seems to be not disruptive. Maybe someone could make a
proposal for TR2.

Best,
Vicente

--
View this message in context: http://boost.2283326.n4.nabble.com/Re-Review-Boost-Type-Traits-Extension-ending-tomorrow-tp3390122p3391062.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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