Problem creating mapping from string to vector_expression

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Problem creating mapping from string to vector_expression

Boost - Dev mailing list

I have been trying to create a mapping from string to

template <class T>
boost::unordered_map<std::string, vector_expression <T> > c;

vector<int> v (10);
for (unsigned i = 0; i < v.size (); ++ i)
v (i) = i;
c <int>["first"] = v;

I have been getting this error :
error: no match for ‘operator=’ (operand types are
boost::hash<std::__cxx11::basic_string<char> >,
std::equal_to<std::__cxx11::basic_string<char> >,
std::allocator<std::pair<const std::__cxx11::basic_string<char>,
boost::numeric::ublas::vector_expression<int> > > >::mapped_type {aka
boost::numeric::ublas::vector_expression<int>}’ and
   columns <int>["first"] = v;

Please help.

Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost