adds full support for pointer to member object type.

[SVN r37683]
This commit is contained in:
Tobias Schwinger
2007-05-13 13:02:45 +00:00
parent 8e1489a8df
commit 8df77f9cd0
3 changed files with 44 additions and 4 deletions

View File

@ -62,6 +62,13 @@ struct synthesize_mfp
>
{ };
template<typename S, typename R = typename mpl::at_c<S,0>::type,
typename C = typename mpl::at_c<S,1>::type>
struct synthesize_mop
{
typedef R C::* type;
};
#define BOOST_FT_variations BOOST_FT_function|BOOST_FT_member_pointer
#define BOOST_FT_al_path boost/function_types/detail/synthesize_impl
#include <boost/function_types/detail/pp_loop.hpp>

View File

@ -18,12 +18,11 @@ namespace boost
{
namespace function_types
{
template< typename T, typename Tag = null_tag >
template< typename T >
struct is_member_object_pointer
: function_types::represents
: function_types::detail::represents_impl
< function_types::components<T>
, function_types::tag<Tag,detail::member_object_pointer_tag>
>
, detail::member_object_pointer_tag >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_member_object_pointer,(T,Tag))
};

View File

@ -0,0 +1,34 @@
// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
//------------------------------------------------------------------------------
#ifndef BOOST_FT_MEMBER_OBJECT_POINTER_HPP_INCLUDED
#define BOOST_FT_MEMBER_OBJECT_POINTER_HPP_INCLUDED
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/type_traits/detail/template_arity_spec.hpp>
#include <boost/function_types/detail/synthesize.hpp>
#include <boost/function_types/detail/to_sequence.hpp>
namespace boost
{
namespace function_types
{
template<typename Types>
struct member_object_pointer
: detail::synthesize_mop< typename detail::to_sequence<Types>::type >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,member_object_pointer,(Types))
};
}
BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,function_types::member_object_pointer)
}
#endif