]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/typeof/include/boost/typeof/register_mem_functions.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / typeof / include / boost / typeof / register_mem_functions.hpp
CommitLineData
7c673cae
FG
1// Copyright (C) 2004 Arkadiy Vertleyb
2// Use, modification and distribution is subject to the Boost Software
3// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
4
5#include <boost/typeof/encode_decode_params.hpp>
6
7// member functions
8
9template<class V, class T, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
10struct encode_type_impl<V, R(T::*)(BOOST_PP_ENUM_PARAMS(n, P)) BOOST_TYPEOF_qualifier>
11{
12 typedef R BOOST_PP_CAT(P, n);
13 typedef T BOOST_PP_CAT(P, BOOST_PP_INC(n));
14 typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_ADD(n, 2), BOOST_TYPEOF_id + n) type;
15};
16
17template<class Iter>
18struct decode_type_impl<boost::mpl::size_t<BOOST_TYPEOF_id + n>, Iter>
19{
20 typedef Iter iter0;
21 BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_ADD(n, 2))
22 template<class T> struct workaround{
23 typedef BOOST_PP_CAT(p, n)(T::*type)(BOOST_PP_ENUM_PARAMS(n, p)) BOOST_TYPEOF_qualifier;
24 };
25 typedef typename workaround<BOOST_PP_CAT(p, BOOST_PP_INC(n))>::type type;
26 typedef BOOST_PP_CAT(iter, BOOST_PP_ADD(n, 2)) iter;
27};
28
29// undef parameters
30
31#undef BOOST_TYPEOF_id
32#undef BOOST_TYPEOF_qualifier