Merged revisions 53158,53182,53334,53337,53419,53421,53521,53566-53568,53578,53590 via svnmerge from

https://svn.boost.org/svn/boost/trunk



[SVN r53591]
This commit is contained in:
Eric Niebler
2009-06-03 04:32:30 +00:00
parent 5dff610007
commit efcab8aae4
3 changed files with 54 additions and 56 deletions

View File

@@ -7,12 +7,8 @@
#if !defined(FUSION_ACCESS_04182005_0737)
#define FUSION_ACCESS_04182005_0737
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/remove_cv.hpp>
namespace boost { namespace fusion { namespace detail
{
@@ -33,22 +29,35 @@ namespace boost { namespace fusion { namespace detail
};
template <typename T>
struct non_ref_parameter
struct call_param
{
typedef typename boost::remove_cv<T>::type const& type;
typedef T const& type;
};
template <typename T>
struct call_param
struct call_param<T &>
{
typedef typename
mpl::eval_if<
is_reference<T>
, mpl::identity<T>
, non_ref_parameter<T>
>::type
type;
typedef T& type;
};
template <typename T>
struct call_param<T const>
{
typedef T const& type;
};
template <typename T>
struct call_param<T volatile>
{
typedef T const& type;
};
template <typename T>
struct call_param<T const volatile>
{
typedef T const& type;
};
}}}
#endif