Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2001-11-29 08:58:59

> From: "David Abrahams" <david.abrahams_at_[hidden]>
>Ah, OK; now I see the logic. We really need compile-time infix operators,
>don't we? ;-)
><X is_derived_from Y>::value

In that case, how about:

template<class L, template<class L, class R> class op, class R>
struct infix
  BOOST_STATIC_CONSTANT(bool, value = (op<L,R>::value) ) ;
} ;

infix<X,is_derived_from,Y>::value ;

I now this is more verbose, and uses template template parameters, but it
does solve the problem, at least in this particular case.

(We could easily have prefix<op,T> and postfix<T,op> too, though I can't see
any use with them)

Fernando Cacciola
Sierra s.r.l.

Boost list run by bdawes at, gregod at, cpdaniel at, john at