From 10bc936c99d58d794c5aac31f7de5dea4c1093a4 Mon Sep 17 00:00:00 2001 From: ilor <kailoran@gmail.com> Date: Sun, 11 Mar 2012 19:29:12 +0100 Subject: [PATCH] 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. --- libwccl/values/strset.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libwccl/values/strset.h b/libwccl/values/strset.h index 0d1082a..5f2e36a 100644 --- a/libwccl/values/strset.h +++ b/libwccl/values/strset.h @@ -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_; } -- GitLab