1
2// (C) Copyright Edward Diener 2019
3// Use, modification and distribution are subject to the Boost Software License,
4// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt).
6
7#if !defined(BOOST_TTI_DETAIL_FUNCTION_TEMPLATE_HPP)
8#define BOOST_TTI_DETAIL_FUNCTION_TEMPLATE_HPP
9
10#include <boost/mpl/and.hpp>
11#include <boost/mpl/eval_if.hpp>
12#include <boost/mpl/or.hpp>
13#include <boost/preprocessor/cat.hpp>
14#include <boost/tti/detail/dmem_fun_template.hpp>
15#include <boost/tti/detail/dstatic_mem_fun_template.hpp>
16#include <boost/tti/detail/dtfunction.hpp>
17#include <boost/tti/detail/denclosing_type.hpp>
18#include <boost/tti/detail/dstatic_function_tags.hpp>
19#include <boost/tti/gen/namespace_gen.hpp>
20
21#define BOOST_TTI_DETAIL_TRAIT_HAS_FUNCTION_TEMPLATE_STATIC_CALL(trait,name,pparray) \
22 BOOST_TTI_DETAIL_TRAIT_IMPL_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,pparray) \
23 template<class BOOST_TTI_DETAIL_TP_T,class BOOST_TTI_DETAIL_TP_R,class BOOST_TTI_DETAIL_TP_FS,class BOOST_TTI_DETAIL_TP_TAG> \
24 struct BOOST_PP_CAT(trait,_detail_hftsc) : \
25 BOOST_PP_CAT(trait,_detail_ihsmft) \
26 < \
27 BOOST_TTI_DETAIL_TP_T, \
28 typename BOOST_TTI_NAMESPACE::detail::tfunction_seq<BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>::type \
29 > \
30 { \
31 }; \
32/**/
33
34#define BOOST_TTI_DETAIL_TRAIT_HAS_FUNCTION_TEMPLATE_STATIC(trait,name,pparray) \
35 BOOST_TTI_DETAIL_TRAIT_HAS_FUNCTION_TEMPLATE_STATIC_CALL(trait,name,pparray) \
36 template<class BOOST_TTI_DETAIL_TP_T,class BOOST_TTI_DETAIL_TP_R,class BOOST_TTI_DETAIL_TP_FS,class BOOST_TTI_DETAIL_TP_TAG> \
37 struct BOOST_PP_CAT(trait,_detail_hfts) : \
38 boost::mpl::eval_if \
39 < \
40 boost::mpl::and_ \
41 < \
42 BOOST_TTI_NAMESPACE::detail::enclosing_type<BOOST_TTI_DETAIL_TP_T>, \
43 BOOST_TTI_NAMESPACE::detail::static_function_tag<BOOST_TTI_DETAIL_TP_TAG> \
44 >, \
45 BOOST_PP_CAT(trait,_detail_hftsc)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>, \
46 boost::mpl::false_ \
47 > \
48 { \
49 }; \
50/**/
51
52#define BOOST_TTI_DETAIL_TRAIT_HAS_FUNCTION_TEMPLATE(trait,name,pparray) \
53 BOOST_TTI_DETAIL_TRAIT_HAS_CALL_TYPES_MEMBER_FUNCTION_TEMPLATE(trait,name,pparray) \
54 BOOST_TTI_DETAIL_TRAIT_HAS_FUNCTION_TEMPLATE_STATIC(trait,name,pparray) \
55 template<class BOOST_TTI_DETAIL_TP_T,class BOOST_TTI_DETAIL_TP_R,class BOOST_TTI_DETAIL_TP_FS,class BOOST_TTI_DETAIL_TP_TAG> \
56 struct BOOST_PP_CAT(trait,_detail_hft) : \
57 boost::mpl::or_ \
58 < \
59 BOOST_PP_CAT(trait,_detail_hmft_call_types)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>, \
60 BOOST_PP_CAT(trait,_detail_hfts)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG> \
61 > \
62 { \
63 }; \
64/**/
65
66#endif // BOOST_TTI_DETAIL_FUNCTION_TEMPLATE_HPP
67

source code of boost/libs/tti/include/boost/tti/detail/dfunction_template.hpp