|
Boost-Commit : |
From: nicola.musatti_at_[hidden]
Date: 2007-10-09 16:55:34
Author: nmusatti
Date: 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
New Revision: 39862
URL: http://svn.boost.org/trac/boost/changeset/39862
Log:
Merge from trunk
Text files modified:
branches/bcbboost/boost/xpressive/detail/core/matcher/action_matcher.hpp | 10 ++++++----
branches/bcbboost/boost/xpressive/detail/core/matcher/attr_matcher.hpp | 12 ++++++++++--
branches/bcbboost/boost/xpressive/detail/static/transforms/as_action.hpp | 8 ++++----
branches/bcbboost/boost/xpressive/detail/static/transforms/as_independent.hpp | 2 +-
branches/bcbboost/boost/xpressive/detail/static/transforms/as_set.hpp | 11 +++++++++--
branches/bcbboost/boost/xpressive/detail/utility/algorithm.hpp | 2 ++
branches/bcbboost/boost/xpressive/match_results.hpp | 7 ++++++-
branches/bcbboost/boost/xpressive/proto/expr.hpp | 11 +++++++++++
branches/bcbboost/boost/xpressive/proto/ref.hpp | 11 +++++++++++
branches/bcbboost/boost/xpressive/regex_algorithms.hpp | 16 +++++++++++-----
branches/bcbboost/boost/xpressive/traits/c_regex_traits.hpp | 4 ++--
branches/bcbboost/boost/xpressive/traits/detail/c_ctype.hpp | 2 +-
12 files changed, 74 insertions(+), 22 deletions(-)
Modified: branches/bcbboost/boost/xpressive/detail/core/matcher/action_matcher.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/detail/core/matcher/action_matcher.hpp (original)
+++ branches/bcbboost/boost/xpressive/detail/core/matcher/action_matcher.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -175,8 +175,10 @@
Expr
>::type
>::type
- >::type::type
- result_type;
+ >::type
+ temp_type;
+
+ typedef typename temp_type::type result_type;
result_type operator ()(Expr const &expr, action_context const &ctx) const
{
@@ -306,7 +308,7 @@
template<typename Expr, typename State, typename Visitor>
static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &)
+ call(Expr const &, State const &state, Visitor &)
{
typedef typename Expr::proto_arg0::matcher_type::value_type::second_type attr_type;
int slot = typename Expr::proto_arg0::nbr_type();
@@ -359,7 +361,7 @@
template<typename Expr, typename State, typename Visitor>
static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &)
+ call(Expr const &expr, State const &, Visitor &)
{
return apply<Expr, State, Visitor>::type::make(proto::arg(expr));
}
Modified: branches/bcbboost/boost/xpressive/detail/core/matcher/attr_matcher.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/detail/core/matcher/attr_matcher.hpp (original)
+++ branches/bcbboost/boost/xpressive/detail/core/matcher/attr_matcher.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -33,6 +33,10 @@
typedef typename Traits::char_type char_type;
Traits const &traits_;
+ explicit char_translate(Traits const &traits)
+ : traits_(traits)
+ {}
+
char_type operator ()(char_type ch1) const
{
return this->traits_.translate(ch1);
@@ -48,6 +52,10 @@
typedef typename Traits::char_type char_type;
Traits const &traits_;
+ explicit char_translate(Traits const &traits)
+ : traits_(traits)
+ {}
+
char_type operator ()(char_type ch1) const
{
return this->traits_.translate_nocase(ch1);
@@ -66,7 +74,7 @@
attr_matcher(int slot, Matcher &matcher, Traits const& traits)
: slot_(slot-1)
{
- char_translate<Traits, ICase> trans = {traits};
+ char_translate<Traits, ICase> trans(traits);
this->sym_.load(matcher, trans);
}
@@ -74,7 +82,7 @@
bool match(match_state<BidiIter> &state, Next const &next) const
{
BidiIter tmp = state.cur_;
- char_translate<Traits, ICase> trans = {traits_cast<Traits>(state)};
+ char_translate<Traits, ICase> trans(traits_cast<Traits>(state));
result_type const &result = this->sym_(state.cur_, state.end_, trans);
if(result)
{
Modified: branches/bcbboost/boost/xpressive/detail/static/transforms/as_action.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/detail/static/transforms/as_action.hpp (original)
+++ branches/bcbboost/boost/xpressive/detail/static/transforms/as_action.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -64,7 +64,7 @@
template<typename Expr, typename State, typename Visitor>
static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ call(Expr const &expr, State const &, Visitor &)
{
return proto::as_expr(proto::arg(expr));
}
@@ -103,7 +103,7 @@
template<typename Expr, typename State, typename Visitor>
static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ call(Expr const &, State const &, Visitor &)
{
typename apply<Expr, State, Visitor>::type that = {{}};
return that;
@@ -184,10 +184,10 @@
template<typename Expr, typename State, typename Visitor>
static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ call(Expr const &expr, State const &, Visitor &visitor)
{
return typename apply<Expr, State, Visitor>::type(
- Expr::proto_arg0::proto_arg0::nbr_type::value
+ Expr::proto_arg0::proto_base_expr::proto_arg0::nbr_type::value
, proto::arg(proto::right(expr))
, visitor.traits()
);
Modified: branches/bcbboost/boost/xpressive/detail/static/transforms/as_independent.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/detail/static/transforms/as_independent.hpp (original)
+++ branches/bcbboost/boost/xpressive/detail/static/transforms/as_independent.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -38,7 +38,7 @@
template<typename Expr, typename State, typename Visitor>
static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ call(Expr const &expr, State const &, Visitor &visitor)
{
return typename apply<Expr, State, Visitor>::type(
Grammar::call(expr, true_xpression(), visitor)
Modified: branches/bcbboost/boost/xpressive/detail/static/transforms/as_set.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/detail/static/transforms/as_set.hpp (original)
+++ branches/bcbboost/boost/xpressive/detail/static/transforms/as_set.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -106,6 +106,13 @@
template<typename Traits>
struct set_fill_visitor
{
+ typedef typename Traits::char_type char_type;
+
+ set_fill_visitor(char_type *buffer, Traits const &traits)
+ : buffer_(buffer)
+ , traits_(traits)
+ {}
+
template<typename Char>
void accept(Char ch)
{
@@ -114,7 +121,7 @@
);
}
- typename Traits::char_type *buffer_;
+ char_type *buffer_;
Traits const &traits_;
};
@@ -141,7 +148,7 @@
call(Expr const &expr, State const &state, Visitor &visitor)
{
typename apply<Expr, State, Visitor>::type set;
- set_fill_visitor<typename Visitor::traits_type> filler = {set.set_, visitor.traits()};
+ set_fill_visitor<typename Visitor::traits_type> filler(set.set_, visitor.traits());
Grammar::call(expr, state, filler);
return set;
}
Modified: branches/bcbboost/boost/xpressive/detail/utility/algorithm.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/detail/utility/algorithm.hpp (original)
+++ branches/bcbboost/boost/xpressive/detail/utility/algorithm.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -22,6 +22,7 @@
#include <boost/range/value_type.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/iterator/iterator_traits.hpp>
+#include <boost/xpressive/detail/utility/ignore_unused.hpp>
namespace boost { namespace xpressive { namespace detail
{
@@ -58,6 +59,7 @@
template<typename InIter, typename Traits>
int toi(InIter &begin, InIter end, Traits const &traits, int radix = 10, int max = INT_MAX)
{
+ detail::ignore_unused(traits);
int i = 0, c = 0;
for(; begin != end && -1 != (c = traits.value(*begin, radix)); ++begin)
{
Modified: branches/bcbboost/boost/xpressive/match_results.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/match_results.hpp (original)
+++ branches/bcbboost/boost/xpressive/match_results.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -7,6 +7,10 @@
// Copyright 2004 Eric Niebler. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// Acknowledgements: Thanks to Markus Sch\:opflin for helping to track down
+// a tricky formatting bug on HP Tru64, and to Steven Watanabe for suggesting
+// the fix.
#ifndef BOOST_XPRESSIVE_MATCH_RESULTS_HPP_EAN_10_04_2005
#define BOOST_XPRESSIVE_MATCH_RESULTS_HPP_EAN_10_04_2005
@@ -21,6 +25,7 @@
#include <utility>
#include <iterator>
#include <typeinfo>
+#include <algorithm>
#include <boost/config.hpp>
#include <boost/assert.hpp>
#include <boost/integer.hpp>
@@ -117,6 +122,7 @@
case_converting_iterator &operator ++()
{
++this->out_;
+ this->next_ = None;
return *this;
}
@@ -158,7 +164,6 @@
}
*this->out_ = ch;
- this->next_ = None;
return *this;
}
Modified: branches/bcbboost/boost/xpressive/proto/expr.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/proto/expr.hpp (original)
+++ branches/bcbboost/boost/xpressive/proto/expr.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -32,6 +32,13 @@
#include <boost/xpressive/proto/traits.hpp>
#include <boost/xpressive/proto/detail/suffix.hpp>
+ #if defined(_MSC_VER) && (_MSC_VER >= 1020)
+ # 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) // user defined constructor required
+ #endif
+
namespace boost { namespace proto
{
/// INTERNAL ONLY
@@ -121,6 +128,10 @@
#undef BOOST_PROTO_UNREF_ARG
}}
+ #if defined(_MSC_VER) && (_MSC_VER >= 1020)
+ # pragma warning(pop)
+ #endif
+
#endif // BOOST_PROTO_EXPR_HPP_EAN_04_01_2005
#elif BOOST_PP_ITERATION_DEPTH() == 1
Modified: branches/bcbboost/boost/xpressive/proto/ref.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/proto/ref.hpp (original)
+++ branches/bcbboost/boost/xpressive/proto/ref.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -17,6 +17,13 @@
#include <boost/xpressive/proto/proto_fwd.hpp>
#include <boost/xpressive/proto/detail/suffix.hpp>
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# 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) // user defined constructor required
+#endif
+
namespace boost { namespace proto
{
@@ -166,4 +173,8 @@
functional::unref const unref = {};
}}
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma warning(pop)
+#endif
+
#endif
Modified: branches/bcbboost/boost/xpressive/regex_algorithms.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/regex_algorithms.hpp (original)
+++ branches/bcbboost/boost/xpressive/regex_algorithms.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -25,6 +25,12 @@
#include <boost/xpressive/detail/core/state.hpp>
#include <boost/xpressive/detail/utility/save_restore.hpp>
+#ifdef BOOST_XPRESSIVE_DOXYGEN_INVOKED
+# define BOOST_XPR_NONDEDUCED_TYPE_(x) x
+#else
+# define BOOST_XPR_NONDEDUCED_TYPE_(x) typename mpl::identity<x>::type
+#endif
+
namespace boost { namespace xpressive
{
@@ -106,7 +112,7 @@
template<typename Char>
inline bool regex_match
(
- typename mpl::identity<Char *>::type begin
+ BOOST_XPR_NONDEDUCED_TYPE_(Char) *begin
, match_results<Char *> &what
, basic_regex<Char *> const &re
, regex_constants::match_flag_type flags = regex_constants::match_default
@@ -159,7 +165,7 @@
template<typename Char>
inline bool regex_match
(
- typename mpl::identity<Char *>::type begin
+ BOOST_XPR_NONDEDUCED_TYPE_(Char) *begin
, basic_regex<Char *> const &re
, regex_constants::match_flag_type flags = regex_constants::match_default
)
@@ -381,7 +387,7 @@
template<typename Char>
inline bool regex_search
(
- typename mpl::identity<Char *>::type begin
+ BOOST_XPR_NONDEDUCED_TYPE_(Char) *begin
, match_results<Char *> &what
, basic_regex<Char *> const &re
, regex_constants::match_flag_type flags = regex_constants::match_default
@@ -434,7 +440,7 @@
template<typename Char>
inline bool regex_search
(
- typename mpl::identity<Char *>::type begin
+ BOOST_XPR_NONDEDUCED_TYPE_(Char) *begin
, basic_regex<Char *> const &re
, regex_constants::match_flag_type flags = regex_constants::match_default
)
@@ -570,7 +576,7 @@
(
std::basic_string<Char> const &str
, basic_regex<typename std::basic_string<Char>::const_iterator> const &re
- , std::basic_string<typename mpl::identity<Char>::type> const &fmt
+ , std::basic_string<BOOST_XPR_NONDEDUCED_TYPE_(Char)> const &fmt
, regex_constants::match_flag_type flags = regex_constants::match_default
)
{
Modified: branches/bcbboost/boost/xpressive/traits/c_regex_traits.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/traits/c_regex_traits.hpp (original)
+++ branches/bcbboost/boost/xpressive/traits/c_regex_traits.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -75,14 +75,14 @@
inline char c_tolower(char ch)
{
using namespace std;
- return tolower(static_cast<unsigned char>(ch));
+ return static_cast<char>(tolower(static_cast<unsigned char>(ch)));
}
template<>
inline char c_toupper(char ch)
{
using namespace std;
- return toupper(static_cast<unsigned char>(ch));
+ return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
}
#ifndef BOOST_XPRESSIVE_NO_WREGEX
Modified: branches/bcbboost/boost/xpressive/traits/detail/c_ctype.hpp
==============================================================================
--- branches/bcbboost/boost/xpressive/traits/detail/c_ctype.hpp (original)
+++ branches/bcbboost/boost/xpressive/traits/detail/c_ctype.hpp 2007-10-09 16:55:33 EDT (Tue, 09 Oct 2007)
@@ -64,7 +64,7 @@
for(std::size_t i = 0; i < name.size(); ++i)
{
using namespace std;
- name[i] = tolower(static_cast<unsigned char>(name[i]));
+ name[i] = static_cast<char>(tolower(static_cast<unsigned char>(name[i])));
}
return name;
}
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