From d43949dd221b81f63448c27023dad597d2e23f5d Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Feb 05 2011 09:51:31 +0000 Subject: Add copy constructors and assignment operator to unordered_* --- diff --git a/boost-1.46.0-unordered-cctor.patch b/boost-1.46.0-unordered-cctor.patch new file mode 100644 index 0000000..96f53c8 --- /dev/null +++ b/boost-1.46.0-unordered-cctor.patch @@ -0,0 +1,92 @@ +Index: /trunk/boost/unordered/unordered_set.hpp +=================================================================== +--- /trunk/boost/unordered/unordered_set.hpp (revision 60754) ++++ /trunk/boost/unordered/unordered_set.hpp (revision 68445) +@@ -155,4 +155,9 @@ + + #if !defined(BOOST_NO_RVALUE_REFERENCES) ++ unordered_set(unordered_set const& other) ++ : table_(other.table_) ++ { ++ } ++ + unordered_set(unordered_set&& other) + : table_(other.table_, boost::unordered_detail::move_tag()) +@@ -163,4 +168,10 @@ + : table_(other.table_, a, boost::unordered_detail::move_tag()) + { ++ } ++ ++ unordered_set& operator=(unordered_set const& x) ++ { ++ table_ = x.table_; ++ return *this; + } + +@@ -652,4 +663,9 @@ + + #if !defined(BOOST_NO_RVALUE_REFERENCES) ++ unordered_multiset(unordered_multiset const& other) ++ : table_(other.table_) ++ { ++ } ++ + unordered_multiset(unordered_multiset&& other) + : table_(other.table_, boost::unordered_detail::move_tag()) +@@ -660,4 +676,10 @@ + : table_(other.table_, a, boost::unordered_detail::move_tag()) + { ++ } ++ ++ unordered_multiset& operator=(unordered_multiset const& x) ++ { ++ table_ = x.table_; ++ return *this; + } + +Index: /trunk/boost/unordered/unordered_map.hpp +=================================================================== +--- /trunk/boost/unordered/unordered_map.hpp (revision 60754) ++++ /trunk/boost/unordered/unordered_map.hpp (revision 68445) +@@ -161,4 +161,9 @@ + + #if !defined(BOOST_NO_RVALUE_REFERENCES) ++ unordered_map(unordered_map const& other) ++ : table_(other.table_) ++ { ++ } ++ + unordered_map(unordered_map&& other) + : table_(other.table_, boost::unordered_detail::move_tag()) +@@ -169,4 +174,10 @@ + : table_(other.table_, a, boost::unordered_detail::move_tag()) + { ++ } ++ ++ unordered_map& operator=(unordered_map const& x) ++ { ++ table_ = x.table_; ++ return *this; + } + +@@ -706,4 +717,9 @@ + + #if !defined(BOOST_NO_RVALUE_REFERENCES) ++ unordered_multimap(unordered_multimap const& other) ++ : table_(other.table_) ++ { ++ } ++ + unordered_multimap(unordered_multimap&& other) + : table_(other.table_, boost::unordered_detail::move_tag()) +@@ -714,4 +730,10 @@ + : table_(other.table_, a, boost::unordered_detail::move_tag()) + { ++ } ++ ++ unordered_multimap& operator=(unordered_multimap const& x) ++ { ++ table_ = x.table_; ++ return *this; + } + diff --git a/boost.spec b/boost.spec index d8525ce..c92a3f3 100644 --- a/boost.spec +++ b/boost.spec @@ -88,6 +88,9 @@ Patch2: boost-cmake-soname.patch # https://svn.boost.org/trac/boost/ticket/4999 Patch3: boost-1.46.0-signals-erase.patch +# https://svn.boost.org/trac/boost/ticket/5119 +Patch4: boost-1.46.0-unordered-cctor.patch + %bcond_with tests %bcond_with docs_generated @@ -414,6 +417,7 @@ sed 's/_FEDORA_SONAME/%{sonamever}/' %{PATCH2} | %{__patch} -p0 --fuzz=0 # fixes %patch3 -p1 +%patch4 -p2 %build @@ -830,6 +834,10 @@ find $RPM_BUILD_ROOT%{_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec %{_ * Thu Feb 3 2011 Petr Machata - 1.46.0-0.1.beta1 - Package 1.46.0-beta1 - Reintroduce the soname patch +- unordered-cctor.patch: Add copy constructors and assignment + operators when using rvalue references +- signals-erase.patch: Pass const_iterator to map::erase to avoid + ambigous overload vs. templatized value_type ctor - Related: #656410 * Mon Jan 10 2011 Denis Arnaud - 1.44.0-7