The following lines does not compile with error:
No viable overloaded '='
std::string myString;
float myFloat;
boost::tuple<const std::string&, float> myTuple
= boost::tuple<const std::string&, float>(myString, myFloat);
std::vector<boost::tuple<const std::string&, float> > myVector;
myVector.push_back(myTuple);
Does anybody has a clue !?
Hint: if I replace the “const std::string&” by a simple std::string, everything is fine.
The members of a vector have to be copy assignable (C++98) or at least movable (C++11). A reference is not.