|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66786 - in sandbox/tti/boost/tti: . detail
From: eldiener_at_[hidden]
Date: 2010-11-27 09:46:35
Author: eldiener
Date: 2010-11-27 09:46:21 EST (Sat, 27 Nov 2010)
New Revision: 66786
URL: http://svn.boost.org/trac/boost/changeset/66786
Log:
Added metafunction for member data
Text files modified:
sandbox/tti/boost/tti/TTIntrospection.hpp | 23 +++++++++++++++++++++++
sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp | 12 +++++++++++-
2 files changed, 34 insertions(+), 1 deletions(-)
Modified: sandbox/tti/boost/tti/TTIntrospection.hpp
==============================================================================
--- sandbox/tti/boost/tti/TTIntrospection.hpp (original)
+++ sandbox/tti/boost/tti/TTIntrospection.hpp 2010-11-27 09:46:21 EST (Sat, 27 Nov 2010)
@@ -324,6 +324,29 @@
>
{
};
+ template
+ <
+ class T,
+ template<class> class HasMember,
+ class R
+ >
+ struct mf_has_member_data :
+ tti::detail::eval
+ <
+ HasMember
+ <
+ tti::detail::eval
+ <
+ tti::detail::ptmd
+ <
+ boost::mpl::identity<T>,
+ R
+ >
+ >
+ >
+ >
+ {
+ };
}
#endif // TT_INTROSPECTION_HPP
Modified: sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp
==============================================================================
--- sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp (original)
+++ sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp 2010-11-27 09:46:21 EST (Sat, 27 Nov 2010)
@@ -233,12 +233,22 @@
class R,
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(TTI_MAX_PARAMETERS,class P,tti::detail::noparam)
>
- struct ptmf
+ struct ptmf
{
typedef boost::mpl::vector<R,T,BOOST_PP_ENUM_PARAMS(TTI_MAX_PARAMETERS,P) > fseq;
typedef typename boost::mpl::remove<fseq,tti::detail::noparam>::type ftseq;
typedef typename boost::function_types::member_function_pointer<ftseq>::type type;
};
+
+ template
+ <
+ class T,
+ class R
+ >
+ struct ptmd
+ {
+ typedef R T::* type;
+ };
}
}
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