Skip to content
Snippets Groups Projects
Commit 10bc936c authored by ilor's avatar ilor
Browse files

Fix compilation on boost-1.48 in non-c++11 mode.

This is a workaround for lovely boost 1.48 incompatibility causing compile errors on assignment to StrSet from a temporary StrSet, see https://svn.boost.org/trac/boost/ticket/6167 for more details.
parent 99917ae8
Branches
No related merge requests found
......@@ -48,6 +48,19 @@ public:
{
}
// Good job, boost. https://svn.boost.org/trac/boost/ticket/6167
// "Assignment from a temporary of a class containing
// boost::unordered_map members fails with GNU GCC"
// Work around this by manually defining op=(const&), otherwise
// on boost 1.48 the following code will fail in non-c++0x mode:
// StrSet s;
// s = StrSet(); //compile error
StrSet& operator=(const StrSet& s) {
set_ = s.set_;
return *this;
}
const value_type& get_value() const {
return set_;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment