Boost logo

Boost :

From: troy d. straszheim (troy_at_[hidden])
Date: 2004-08-31 20:15:20


Things that go into sets must be less-than-able. The operators less
than are in
in tuple_comparison.hpp. Add that and your example works....

-t

On Sep 1, 2004, at 12:52 AM, Trey Jackson wrote:

> All,
>
> I was trying to use the tuple in a set, and the STL complained about
> not having an operator&() - I think.
>
> My question is, is tuple supposed to be usable in a set?
>
> I read the STL docs: no mention of operator&() required.
> I tried both STLport and gcc's stl.
>
> I'm using gcc 3.2.2, and the snippet of code is real easy:
>
> ,----------------
> | #include <boost/tuple/tuple.hpp>
> | #include <set>
> |
> | using namespace std;
> |
> | using namespace boost;
> |
> | int
> | main(int, char *[])
> | {
> | typedef tuple<int, int, int> Things;
> |
> | std::set<Things> mySet;
> |
> | Things oneThing(1,2,3);
> | mySet.insert(oneThing);
> |
> | return 0;
> | }
> `----------------
>
>
>
> tia,
>
> TJ
>
> --
> Trey Jackson
> tjackson_at_[hidden]
>
> "Nobody can give you wiser advice than yourself."
> -- Cicero
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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