Boost logo

Ublas :

From: johanngoetz (jgoetz_at_[hidden])
Date: 2008-05-30 15:19:29


I have the same issue (though I am using ublas::bounded_vector instead). This
would be a great feature to have. Is anyone looking into this or have a
solution? (I'm using gcc v4.1.2, boost svn trunk at 2008-05-12 around v1.35)

martux wrote:
>
> Hi,
> I tried using a ublas vector as key type in a std::map along the lines of
>
> boost::ublas::vector<double> x(2);
> std::map<boost::ublas::vector<double>, int> vm;
> vm[x] = 1;
>
> which wont compile (gcc 4.0.3) due to
>
> /usr/lib/gcc/x86_64-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/stl_function.h:227:
> error: no match
> for ‘operator<’ in ‘__x < __y’.
>
> Adding an implementation of
>
> bool operator<(boost::ublas::vector<double> const& A,
> boost::ublas::vector<double> const& B) {...}
>
> unfortunately doesnt help. Could anyone please point out what I am
> missing?
>

-- 
View this message in context: http://www.nabble.com/ublas%3A%3Avector-in-std%3A%3Amap-tp9338948p17566266.html
Sent from the Boost - uBLAS mailing list archive at Nabble.com.