
Mickael Wolff <mickael <at> lupusmic.org> writes:
Reetesh Mukul a écrit :
Hi,
This code compiles:-
If you don't have, get a book about C++ ;) . Templates can have default parameters like functions :
template<typename LEFT = bool, typename RIGHT = bool> compare(LEFT, RIGHT) ;
;) This I know. I meant something very different. I wanted to ask what can be the meaning of "or" operation on an empty list/vector of parameters. Here or_<> is provided an empty set of parameters. Now looking into code of or_<> it appears that for no-parameters, it will inherit from false_. But when I have compiled code ( in my last mail ) using gcc (4.1), I saw that there were no "type" inside or_<>. Typically or_<T1,T2..> has a type in it. Strange enough, but reasonable, or_<na,na,na> has a type inside it ( the false_ one ). Now if suppose or_<> to false, how one is going to evaluate typedef and_<true_,true_,or_<> > tto; So please clear my gcc observation and the mathematical context of or_<>. With Regards, Reetesh Mukul