Hi, I got the answer on why overloading of operator < is required. std::set orders its elements, so "<" operator is required for comparison on the type of elements it is holding.
But I haven't got answer to my other question -- why doesn't thrift compiler generate code for this? Does the thrift community write their own implementations for "operator <" ? Thank you. Regards, Raghava. On Mon, Jul 26, 2010 at 4:09 PM, Raghava Mutharaju < [email protected]> wrote: > Hello all, > > In the code that thrift generates for C++, in all the classes, it overloads > 3 operators, ==, != and <. Implementations for == and != are provided but > there won't be any implementation for < operator. Why is this so? How come > it doesn't generate any compilation errors? (except in one case I got a > linker error -- mentioned in my previous post). How are these overloaded > operators used? > > Thank you. > > Regards, > Raghava. >
