|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61219 - in trunk/boost/spirit/home/phoenix: core core/detail detail
From: joel_at_[hidden]
Date: 2010-04-11 23:20:35
Author: djowel
Date: 2010-04-11 23:20:34 EDT (Sun, 11 Apr 2010)
New Revision: 61219
URL: http://svn.boost.org/trac/boost/changeset/61219
Log:
bug fix. removing add_const in result_of type deduction.
Text files modified:
trunk/boost/spirit/home/phoenix/core/actor.hpp | 34 +++++++++++++++++-----------------
trunk/boost/spirit/home/phoenix/core/detail/actor.hpp | 6 +++---
trunk/boost/spirit/home/phoenix/detail/type_deduction.hpp | 1 +
3 files changed, 21 insertions(+), 20 deletions(-)
Modified: trunk/boost/spirit/home/phoenix/core/actor.hpp
==============================================================================
--- trunk/boost/spirit/home/phoenix/core/actor.hpp (original)
+++ trunk/boost/spirit/home/phoenix/core/actor.hpp 2010-04-11 23:20:34 EDT (Sun, 11 Apr 2010)
@@ -1,7 +1,7 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
- Distributed under the Boost Software License, Version 1.0. (See accompanying
+ 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)
==============================================================================*/
#ifndef PHOENIX_CORE_ACTOR_HPP
@@ -26,7 +26,7 @@
{
// phoenix::void_ is the same as fusion::void_
typedef fusion::void_ void_;
-
+
namespace detail
{
// Forward declarations. These will come in when we get to the
@@ -41,13 +41,13 @@
template <typename BaseT0, typename BaseT1>
struct comma_result;
-
+
// error no arguments supplied
struct error_expecting_arguments
{
template <typename T>
error_expecting_arguments(T const&) {}
- };
+ };
}
template <typename Eval, typename Env>
@@ -63,7 +63,7 @@
typedef Eval eval_type;
template <class Sig> struct result {};
-
+
actor()
: Eval() {}
@@ -78,7 +78,7 @@
actor(T0 const& _0, T1 const& _1)
: Eval(_0, _1) {}
- typedef typename
+ typedef typename
mpl::eval_if<
typename Eval::no_nullary // avoid calling eval_result when this is true
, mpl::identity<detail::error_expecting_arguments>
@@ -86,7 +86,7 @@
>::type
nullary_result;
- nullary_result
+ nullary_result
operator()() const
{
return eval_type::eval(basic_environment<>());
@@ -97,11 +97,11 @@
: eval_result<
eval_type
, basic_environment<
- typename remove_reference<typename add_const<A0>::type>::type
+ typename remove_reference<A0>::type
>
>
{};
-
+
template <typename T0>
typename result<actor(T0&)>::type
operator()(T0& _0) const
@@ -114,19 +114,19 @@
: eval_result<
eval_type
, basic_environment<
- typename remove_reference<typename add_const<A0>::type>::type
- , typename remove_reference<typename add_const<A1>::type>::type
+ typename remove_reference<A0>::type
+ , typename remove_reference<A1>::type
>
>
{};
-
+
template <typename T0, typename T1>
typename result<actor(T0&,T1&)>::type
operator()(T0& _0, T1& _1) const
{
return eval_type::eval(basic_environment<T0, T1>(_0, _1));
}
-
+
template <typename T1>
typename detail::make_assign_composite<self_type, T1>::type
operator=(T1 const& a1) const;
@@ -135,7 +135,7 @@
typename detail::make_index_composite<self_type, T1>::type
operator[](T1 const& a1) const;
- // Bring in the rest of the constructors and function call operators
+ // Bring in the rest of the constructors and function call operators
#include <boost/spirit/home/phoenix/core/detail/actor.hpp>
private:
@@ -145,8 +145,8 @@
// Forward declaration: The intent to overload the comma must be
// stated early on to avoid the subtle problem that arises when
- // the header file where the comma operator overload is defined,
- // is not included by the client and the client attempts to use
+ // the header file where the comma operator overload is defined,
+ // is not included by the client and the client attempts to use
// the comma anyway.
namespace detail
@@ -167,7 +167,7 @@
{
typedef typename phoenix::actor<Eval>::nullary_result type;
};
-
+
template <typename Eval>
struct result_of<phoenix::actor<Eval> const()>
: result_of<phoenix::actor<Eval>()>
Modified: trunk/boost/spirit/home/phoenix/core/detail/actor.hpp
==============================================================================
--- trunk/boost/spirit/home/phoenix/core/detail/actor.hpp (original)
+++ trunk/boost/spirit/home/phoenix/core/detail/actor.hpp 2010-04-11 23:20:34 EDT (Sun, 11 Apr 2010)
@@ -1,7 +1,7 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
- Distributed under the Boost Software License, Version 1.0. (See accompanying
+ 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)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
@@ -40,8 +40,8 @@
, basic_environment<
BOOST_PP_ENUM_BINARY_PARAMS(
N
- , typename remove_reference<typename add_const<A
- , >::type>::type BOOST_PP_INTERCEPT
+ , typename remove_reference<A
+ , >::type BOOST_PP_INTERCEPT
)
>
>
Modified: trunk/boost/spirit/home/phoenix/detail/type_deduction.hpp
==============================================================================
--- trunk/boost/spirit/home/phoenix/detail/type_deduction.hpp (original)
+++ trunk/boost/spirit/home/phoenix/detail/type_deduction.hpp 2010-04-11 23:20:34 EDT (Sun, 11 Apr 2010)
@@ -182,6 +182,7 @@
#include <boost/mpl/and.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_reference.hpp>
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