C++ gcc编译错误“;装订‘;常数s’;引用类型为‘;标准普尔’;“丢弃限定符”;在其他容器中使用boost::container::static_向量时

C++ gcc编译错误“;装订‘;常数s’;引用类型为‘;标准普尔’;“丢弃限定符”;在其他容器中使用boost::container::static_向量时,c++,boost,boost-container,C++,Boost,Boost Container,在另一个容器(如std::vector)中使用boost::container::static_vector时,gcc返回编译错误。以下测试用例再现了错误: #include <boost/container/static_vector.hpp> #include <vector> struct s { boost::container::static_vector<int,6> a; }; int main() { std::vector

在另一个容器(如std::vector)中使用boost::container::static_vector时,gcc返回编译错误。以下测试用例再现了错误:

#include <boost/container/static_vector.hpp>
#include <vector>

struct s
{
    boost::container::static_vector<int,6> a;
};

int main()
{
    std::vector<s> b;
    b.resize(6);
}

只有当结构包含静态向量时,才会发生此错误。此错误的原因是什么?是否有解决方法?

编译器生成的默认复制分配运算符似乎具有签名

s& operator= (s&);
您的代码在这行
fill
算法中失败(在
resize
方法中以某种方式调用):


谢谢,这或多或少也是我得出的结论。我只是想看看有没有遗漏什么。
s& operator= (s&);
  for (; __first != __last; ++__first)
      *__first = __value;  // <----- call operator=(s&) passing const s& object
 s& operator = (const s& other) {
     a = other.a;
     return *this;
 }