|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2008-02-05 00:33:14
Author: eric_niebler
Date: 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
New Revision: 43107
URL: http://svn.boost.org/trac/boost/changeset/43107
Log:
eliminate warnings under msvc's -W4
Text files modified:
trunk/boost/xpressive/detail/core/matcher/action_matcher.hpp | 12 ++++++++++++
trunk/boost/xpressive/detail/core/matcher/assert_word_matcher.hpp | 2 ++
trunk/boost/xpressive/detail/core/matcher/attr_matcher.hpp | 2 ++
trunk/boost/xpressive/detail/core/peeker.hpp | 4 ++++
trunk/boost/xpressive/detail/dynamic/parser.hpp | 2 ++
trunk/boost/xpressive/detail/static/transforms/as_quantifier.hpp | 10 +++++-----
trunk/boost/xpressive/detail/static/transforms/as_set.hpp | 2 ++
trunk/boost/xpressive/proto/debug.hpp | 1 +
trunk/boost/xpressive/proto/eval.hpp | 3 +--
trunk/boost/xpressive/proto/fusion.hpp | 12 ++++++++++++
trunk/boost/xpressive/proto/make_expr.hpp | 23 +++++++++++++----------
trunk/boost/xpressive/proto/transform/make.hpp | 2 +-
trunk/boost/xpressive/regex_actions.hpp | 12 ++++++++++++
trunk/boost/xpressive/regex_primitives.hpp | 2 +-
14 files changed, 70 insertions(+), 19 deletions(-)
Modified: trunk/boost/xpressive/detail/core/matcher/action_matcher.hpp
==============================================================================
--- trunk/boost/xpressive/detail/core/matcher/action_matcher.hpp (original)
+++ trunk/boost/xpressive/detail/core/matcher/action_matcher.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -16,6 +16,7 @@
# pragma once
#endif
+#include <boost/config.hpp>
#include <boost/version.hpp>
#include <boost/ref.hpp>
#include <boost/assert.hpp>
@@ -39,6 +40,13 @@
# include <boost/fusion/include/pop_front.hpp>
#endif
+#if BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable : 4510) // default constructor could not be generated
+#pragma warning(disable : 4512) // assignment operator could not be generated
+#pragma warning(disable : 4610) // can never be instantiated - user defined constructor required
+#endif
+
namespace boost { namespace xpressive { namespace detail
{
@@ -474,4 +482,8 @@
}}}
+#if BOOST_MSVC
+#pragma warning(pop)
+#endif
+
#endif
Modified: trunk/boost/xpressive/detail/core/matcher/assert_word_matcher.hpp
==============================================================================
--- trunk/boost/xpressive/detail/core/matcher/assert_word_matcher.hpp (original)
+++ trunk/boost/xpressive/detail/core/matcher/assert_word_matcher.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -16,6 +16,7 @@
#include <boost/assert.hpp>
#include <boost/xpressive/detail/detail_fwd.hpp>
#include <boost/xpressive/detail/core/quant_style.hpp>
+#include <boost/xpressive/detail/utility/ignore_unused.hpp>
#include <boost/xpressive/detail/core/state.hpp>
namespace boost { namespace xpressive { namespace detail
@@ -95,6 +96,7 @@
bool is_word(Traits const &traits, char_type ch) const
{
+ detail::ignore_unused(traits);
return traits.isctype(traits.translate(ch), this->word_);
}
Modified: trunk/boost/xpressive/detail/core/matcher/attr_matcher.hpp
==============================================================================
--- trunk/boost/xpressive/detail/core/matcher/attr_matcher.hpp (original)
+++ trunk/boost/xpressive/detail/core/matcher/attr_matcher.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -41,6 +41,8 @@
{
return this->traits_.translate(ch1);
}
+ private:
+ char_translate &operator =(char_translate const &);
};
///////////////////////////////////////////////////////////////////////////////
Modified: trunk/boost/xpressive/detail/core/peeker.hpp
==============================================================================
--- trunk/boost/xpressive/detail/core/peeker.hpp (original)
+++ trunk/boost/xpressive/detail/core/peeker.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -61,6 +61,8 @@
hash_peek_bitset<char_type> &bset_;
Traits const &traits_;
+private:
+ char_sink &operator =(char_sink const &);
};
///////////////////////////////////////////////////////////////////////////////
@@ -257,6 +259,8 @@
}
private:
+ xpression_peeker(xpression_peeker const &);
+ xpression_peeker &operator =(xpression_peeker const &);
template<typename Traits>
Traits const &get_traits_() const
Modified: trunk/boost/xpressive/detail/dynamic/parser.hpp
==============================================================================
--- trunk/boost/xpressive/detail/dynamic/parser.hpp (original)
+++ trunk/boost/xpressive/detail/dynamic/parser.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -21,6 +21,7 @@
#include <boost/xpressive/regex_constants.hpp>
#include <boost/xpressive/detail/detail_fwd.hpp>
#include <boost/xpressive/detail/core/matchers.hpp>
+#include <boost/xpressive/detail/utility/ignore_unused.hpp>
#include <boost/xpressive/detail/dynamic/dynamic.hpp>
// The Regular Expression grammar, in pseudo BNF:
@@ -171,6 +172,7 @@
, Traits const &traits
)
{
+ detail::ignore_unused(traits);
if(0 != compound.posix_yes())
{
typename Traits::char_class_type mask = compound.posix_yes();
Modified: trunk/boost/xpressive/detail/static/transforms/as_quantifier.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_quantifier.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_quantifier.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -79,7 +79,7 @@
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
- operator ()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &, Visitor &visitor) const
{
typedef result<void(Expr, State, Visitor)> result_;
typedef typename result_::arg_type arg_type;
@@ -115,7 +115,7 @@
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
- operator ()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &, Visitor &visitor) const
{
// we're inserting a hidden mark ... so grab the next hidden mark number.
int mark_nbr = visitor.get_hidden_mark();
@@ -210,7 +210,7 @@
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
- operator ()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &, Visitor &visitor) const
{
return typename result<void(Expr, State, Visitor)>::type(
Grammar()(expr, detail::alternate_end_xpression(), visitor)
@@ -236,7 +236,7 @@
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
- operator ()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &, Visitor &visitor) const
{
int mark_number = proto::arg(proto::left(expr)).mark_number_;
return typename result<void(Expr, State, Visitor)>::type(
@@ -280,7 +280,7 @@
template<typename Expr, typename State, typename Visitor>
typename unary_expr<optional_tag<Greedy>, Expr>::type
- operator ()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &, Visitor &) const
{
typename unary_expr<optional_tag<Greedy>, Expr>::type that = {expr};
return that;
Modified: trunk/boost/xpressive/detail/static/transforms/as_set.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_set.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_set.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -119,6 +119,8 @@
}
private:
+ merge_charset &operator =(merge_charset const &);
+
template<typename Expr, typename Tag>
void call_(Expr const &expr, Tag) const
{
Modified: trunk/boost/xpressive/proto/debug.hpp
==============================================================================
--- trunk/boost/xpressive/proto/debug.hpp (original)
+++ trunk/boost/xpressive/proto/debug.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -181,6 +181,7 @@
}
private:
+ diaply_expr &operator =(display_expr const &);
int depth_;
mutable bool first_;
std::ostream &sout_;
Modified: trunk/boost/xpressive/proto/eval.hpp
==============================================================================
--- trunk/boost/xpressive/proto/eval.hpp (original)
+++ trunk/boost/xpressive/proto/eval.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -60,8 +60,7 @@
/// \param The Proto expression to evaluate
/// \param The context in which the expression should be
/// evaluated.
- /// \note This function is equivalent to
- /// <tt>typename Context::template eval<Expr>()(expr, context)</tt>.
+ /// \return <tt>typename Context::template eval<Expr>()(expr, context)</tt>
template<typename Expr, typename Context>
typename proto::result_of::eval<Expr, Context>::type
operator ()(Expr &expr, Context &context) const
Modified: trunk/boost/xpressive/proto/fusion.hpp
==============================================================================
--- trunk/boost/xpressive/proto/fusion.hpp (original)
+++ trunk/boost/xpressive/proto/fusion.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -10,6 +10,7 @@
#define BOOST_PROTO_FUSION_HPP_EAN_11_04_2006
#include <boost/xpressive/proto/detail/prefix.hpp>
+#include <boost/config.hpp>
#include <boost/version.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/mpl/long.hpp>
@@ -43,6 +44,13 @@
#include <boost/xpressive/proto/eval.hpp>
#include <boost/xpressive/proto/detail/suffix.hpp>
+#if BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable : 4510) // default constructor could not be generated
+#pragma warning(disable : 4512) // assignment operator could not be generated
+#pragma warning(disable : 4610) // can never be instantiated - user defined constructor required
+#endif
+
namespace boost { namespace proto
{
@@ -632,4 +640,8 @@
#undef UNREF
+#if BOOST_MSVC
+#pragma warning(pop)
+#endif
+
#endif
Modified: trunk/boost/xpressive/proto/make_expr.hpp
==============================================================================
--- trunk/boost/xpressive/proto/make_expr.hpp (original)
+++ trunk/boost/xpressive/proto/make_expr.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -351,10 +351,14 @@
struct protoify_
{
typedef
+ typename boost::unwrap_reference<T>::type
+ unref_type;
+
+ typedef
typename mpl::eval_if<
boost::is_reference_wrapper<T>
- , proto::result_of::as_arg<typename boost::unwrap_reference<T>::type, Domain>
- , proto::result_of::as_expr<T, Domain>
+ , proto::result_of::as_arg<unref_type, Domain>
+ , proto::result_of::as_expr<unref_type, Domain>
>::type
type;
@@ -364,7 +368,7 @@
is_reference_wrapper<T>
, functional::as_arg<Domain>
, functional::as_expr<Domain>
- >::type()(static_cast<typename boost::unwrap_reference<T>::type &>(t));
+ >::type()(static_cast<unref_type &>(t));
}
};
@@ -372,17 +376,16 @@
struct protoify_<T &, Domain>
{
typedef
- typename proto::result_of::as_arg<
- typename boost::unwrap_reference<T>::type
- , Domain
- >::type
+ typename boost::unwrap_reference<T>::type
+ unref_type;
+
+ typedef
+ typename proto::result_of::as_arg<unref_type, Domain>::type
type;
static type call(T &t)
{
- return functional::as_arg<Domain>()(
- static_cast<typename boost::unwrap_reference<T>::type &>(t)
- );
+ return functional::as_arg<Domain>()(static_cast<unref_type &>(t));
}
};
Modified: trunk/boost/xpressive/proto/transform/make.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/make.hpp (original)
+++ trunk/boost/xpressive/proto/transform/make.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -178,7 +178,7 @@
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
- operator ()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &, State const &, Visitor &) const
{
typedef typename result<void(Expr, State, Visitor)>::type result_type;
return result_type();
Modified: trunk/boost/xpressive/regex_actions.hpp
==============================================================================
--- trunk/boost/xpressive/regex_actions.hpp (original)
+++ trunk/boost/xpressive/regex_actions.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -14,6 +14,7 @@
# pragma once
#endif
+#include <boost/config.hpp>
#include <boost/ref.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/or.hpp>
@@ -52,6 +53,13 @@
///
#define UNCVREF(x) typename remove_cv<typename remove_reference<x>::type>::type
+#if BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable : 4510) // default constructor could not be generated
+#pragma warning(disable : 4512) // assignment operator could not be generated
+#pragma warning(disable : 4610) // can never be instantiated - user defined constructor required
+#endif
+
namespace boost { namespace xpressive
{
@@ -818,4 +826,8 @@
#undef UNREF
#undef UNCVREF
+#if BOOST_MSVC
+#pragma warning(pop)
+#endif
+
#endif // BOOST_XPRESSIVE_ACTIONS_HPP_EAN_03_22_2007
Modified: trunk/boost/xpressive/regex_primitives.hpp
==============================================================================
--- trunk/boost/xpressive/regex_primitives.hpp (original)
+++ trunk/boost/xpressive/regex_primitives.hpp 2008-02-05 00:33:12 EST (Tue, 05 Feb 2008)
@@ -136,7 +136,7 @@
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
- operator ()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &) const
{
typedef typename result<void(Expr, State, Visitor)>::type type;
type that = {{{state}}, expr};
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