C++ Boost元组和stl向量编译错误

C++ Boost元组和stl向量编译错误,c++,boost,C++,Boost,以下行未编译,但有错误: 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

以下行未编译,但有错误:

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);
没有可行的重载'='
std::string myString;
浮动我的浮动;
boost::tuple myTuple
=boost::tuple(myString,myFloat);
std::vector myVector;
myVector.push_back(myTuple);
有人有线索吗!?
提示:如果我将“const std::string&”替换为一个简单的std::string,则一切正常。

向量的成员必须是可复制分配的(C++98)或至少是可移动的(C++11)。引用不可用。

原因如下: