|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57631 - in trunk: boost/variant boost/variant/detail libs/variant/test
From: john_at_[hidden]
Date: 2009-11-13 05:07:31
Author: johnmaddock
Date: 2009-11-13 05:07:30 EST (Fri, 13 Nov 2009)
New Revision: 57631
URL: http://svn.boost.org/trac/boost/changeset/57631
Log:
Fix various Variant warnings.
Addresses issue #1507.
Text files modified:
trunk/boost/variant/detail/apply_visitor_binary.hpp | 6 ++++++
trunk/boost/variant/detail/apply_visitor_delayed.hpp | 3 +++
trunk/boost/variant/detail/variant_io.hpp | 3 +++
trunk/boost/variant/detail/visitation_impl.hpp | 8 ++++++++
trunk/boost/variant/variant.hpp | 6 ++++++
trunk/libs/variant/test/Jamfile.v2 | 7 +++++++
trunk/libs/variant/test/test7.cpp | 3 +++
trunk/libs/variant/test/test8.cpp | 2 ++
8 files changed, 38 insertions(+), 0 deletions(-)
Modified: trunk/boost/variant/detail/apply_visitor_binary.hpp
==============================================================================
--- trunk/boost/variant/detail/apply_visitor_binary.hpp (original)
+++ trunk/boost/variant/detail/apply_visitor_binary.hpp 2009-11-13 05:07:30 EST (Fri, 13 Nov 2009)
@@ -63,6 +63,9 @@
return visitor_(value1_, value2);
}
+private:
+ apply_visitor_binary_invoke& operator=(const apply_visitor_binary_invoke&);
+
};
template <typename Visitor, typename Visitable2>
@@ -100,6 +103,9 @@
return boost::apply_visitor(invoker, visitable2_);
}
+private:
+ apply_visitor_binary_unwrap& operator=(const apply_visitor_binary_unwrap&);
+
};
}} // namespace detail::variant
Modified: trunk/boost/variant/detail/apply_visitor_delayed.hpp
==============================================================================
--- trunk/boost/variant/detail/apply_visitor_delayed.hpp (original)
+++ trunk/boost/variant/detail/apply_visitor_delayed.hpp 2009-11-13 05:07:30 EST (Fri, 13 Nov 2009)
@@ -72,6 +72,9 @@
return apply_visitor(visitor_, visitable1, visitable2);
}
+private:
+ apply_visitor_delayed_t& operator=(const apply_visitor_delayed_t&);
+
};
template <typename Visitor>
Modified: trunk/boost/variant/detail/variant_io.hpp
==============================================================================
--- trunk/boost/variant/detail/variant_io.hpp (original)
+++ trunk/boost/variant/detail/variant_io.hpp 2009-11-13 05:07:30 EST (Fri, 13 Nov 2009)
@@ -64,6 +64,9 @@
out_ << operand;
}
+private:
+ printer& operator=(const printer&);
+
};
}} // namespace detail::variant
Modified: trunk/boost/variant/detail/visitation_impl.hpp
==============================================================================
--- trunk/boost/variant/detail/visitation_impl.hpp (original)
+++ trunk/boost/variant/detail/visitation_impl.hpp 2009-11-13 05:07:30 EST (Fri, 13 Nov 2009)
@@ -35,6 +35,10 @@
#include "boost/type_traits/has_nothrow_copy.hpp"
#include "boost/variant/detail/has_nothrow_move.hpp"
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+# pragma warning (push)
+# pragma warning (disable : 4702) //unreachable code
+#endif
///////////////////////////////////////////////////////////////////////////////
// BOOST_VARIANT_VISITATION_UNROLLING_LIMIT
@@ -283,4 +287,8 @@
}} // namespace detail::variant
} // namespace boost
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+# pragma warning(pop)
+#endif
+
#endif // BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
Modified: trunk/boost/variant/variant.hpp
==============================================================================
--- trunk/boost/variant/variant.hpp (original)
+++ trunk/boost/variant/variant.hpp 2009-11-13 05:07:30 EST (Fri, 13 Nov 2009)
@@ -698,6 +698,9 @@
::boost::detail::variant::move_swap( operand, other );
}
+private:
+ swap_with& operator=(const swap_with&);
+
};
///////////////////////////////////////////////////////////////////////////////
@@ -759,6 +762,9 @@
return Comp()(lhs_content, rhs_content);
}
+private:
+ comparer& operator=(const comparer&);
+
};
///////////////////////////////////////////////////////////////////////////////
Modified: trunk/libs/variant/test/Jamfile.v2
==============================================================================
--- trunk/libs/variant/test/Jamfile.v2 (original)
+++ trunk/libs/variant/test/Jamfile.v2 2009-11-13 05:07:30 EST (Fri, 13 Nov 2009)
@@ -11,6 +11,11 @@
# provided the above notices are retained, and a notice that the code was
# modified is included with the above copyright notice.
#
+project
+ : requirements
+ #<dependency>/boost/test//minimal
+ <toolset>msvc:<asynch-exceptions>on
+ ;
test-suite variant
:
@@ -28,3 +33,5 @@
[ run variant_comparison_test.cpp ]
[ run variant_visit_test.cpp ]
;
+
+
Modified: trunk/libs/variant/test/test7.cpp
==============================================================================
--- trunk/libs/variant/test/test7.cpp (original)
+++ trunk/libs/variant/test/test7.cpp 2009-11-13 05:07:30 EST (Fri, 13 Nov 2009)
@@ -197,6 +197,9 @@
ValueType& expected_;
+private:
+ compare_helper& operator=(const compare_helper&);
+
};
template<typename VariantType, typename ExpectedType>
Modified: trunk/libs/variant/test/test8.cpp
==============================================================================
--- trunk/libs/variant/test/test8.cpp (original)
+++ trunk/libs/variant/test/test8.cpp 2009-11-13 05:07:30 EST (Fri, 13 Nov 2009)
@@ -63,6 +63,7 @@
try
{
T& r = get<T>(v);
+ (void)r; // suppress warning about r not being used
BOOST_CHECK(false && &r); // should never reach
}
catch(boost::bad_get&)
@@ -110,3 +111,4 @@
return boost::exit_success;
}
+
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk