Boost logo

Boost :

Subject: [boost] Problem creating mapping from string to vector_expression
From: SHIVAM MITTAL (2015csb1032_at_[hidden])
Date: 2017-03-30 13:30:22


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.

Boost list run by bdawes at, gregod at, cpdaniel at, john at