Non-static const member, can't use default assignment operator

后端 未结 4 1649
北海茫月
北海茫月 2020-11-27 04:45

A program I\'m expanding uses std::pair<> a lot.

There is a point in my code at which the compiler throws a rather large:

N

4条回答
  •  天涯浪人
    2020-11-27 05:17

    I faced the same issue, and came across this page.

    http://blog.copton.net/archives/2007/10/13/stdvector/index.html

    From the page:

    Please note that this is no GNU specific problem here. The ISO C++ standard requires that T has an assignment operator (see section 23.2.4.3). I just showed on the example of GNU's STL implementation where this can lead to.

提交回复
热议问题