Opened 10 years ago
Closed 10 years ago
#6920 closed Bugs (wontfix)
interprocess::string error under vs2005
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.49.0 | Severity: | Problem |
Keywords: | interprocess string | Cc: |
Description
#include <boost/interprocess/containers/string.hpp> struct Test { boost::interprocess::string s; }; int main() { { Test const test; Test test2 = test; // ok test2 = test; // error C2679 } { boost::interprocess::string const test; // ok boost::interprocess::string test2 = test; // ok test2 = test; // ok } return 0; }
Note:
See TracTickets
for help on using tickets.
Sorry, but this is a limitation imposed by Boost.Move:
http://www.boost.org/doc/libs/1_50_0/doc/html/move/emulation_limitations.html#move.emulation_limitations.assignment_operator
There is no known workaround, and move semantics are too importante to be left out. You will need to declare the copy assignment explicitly to be able to compile your code.