📄 function_types.qbk
字号:
Determines whether a given type is a pointer to member object type. [endsect][section:is_member_function_pointer is_member_function_pointer] template<typename T, typename Tag = __null_tag> struct is_member_function_pointer;[*Header] #include <boost/function_types/is_member_function_pointer.hpp>[variablelist [[[^T]][Type to analyze]] [[[^Tag]][Further properties required for a positive result]] [[[^is_member_function_pointer<T,Tag>]][Predicate value __mpl_integral_constant__]] [[[^is_member_function_pointer<T,Tag>::value]][Constant boolean value]]]Determines whether a given type is a member function pointer, possibly withadditional properties as specified by a property tag.[endsect][section:is_callable_builtin is_callable_builtin] template<typename T, typename Tag = __null_tag> struct is_callable_builtin;[*Header] #include <boost/function_types/is_callable_builtin.hpp>[variablelist [[[^T]][Type to analyze]] [[[^Tag]][Further properties required for a positive result]] [[[^is_callable_builtin<T,Tag>]][Predicate value as __mpl_integral_constant__]] [[[^is_callable_builtin<T,Tag>::value]][Constant boolean value]]]Determines whether a given type is a callable builtin, possibly withadditional properties as specified by a property tag.[endsect][section:is_nonmember_callable_builtin is_nonmember_callable_builtin] template<typename T, typename Tag = __null_tag> struct is_nonmember_callable_builtin;[*Header] #include <boost/function_types/is_nonmember_callable_builtin.hpp>[variablelist [[[^T]][Type to analyze]] [[[^Tag]][Further properties required for a positive result]] [[[^is_nonmember_callable_builtin<T,Tag>]][Predicate value as __mpl_integral_constant__]] [[[^is_nonmember_callable_builtin<T,Tag>::value]][Constant boolean value]]]Determines whether a given type is a callable builtin that is not amember function pointer, possibly withadditional properties as specified by a property tag.[endsect][endsect] [/ Class templates for type classification ][/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ][section:decomposition Class templates for type decomposition][section:result_type result_type] template<typename F> struct result_type;[*Header] #include <boost/function_types/result_type.hpp>[variablelist [[[^F]][Type to analyze]] [[[^result_type<F>::type]][Result type of [^F]]]]Extracts the result type of a callable, builtin type.If [^F] is no callable, builtin type, any attempt to access the[^type] member results in a compile error.[endsect][section:parameter_types parameter_types] template<typename F, class ClassTransform = add_reference<_> > struct parameter_types;[*Header] #include <boost/function_types/parameter_types.hpp>[variablelist [[[^F]][Type to analyze]] [[[^ClassTransform]] [__mpl_lambda_expression__ to transform the class type if [^F] is a member function pointer]] [[[^parameter_types<F,ClassTransform>]] [__mpl_fb_ext_ra_seq__ of parameter types]]]Extracts the parameter types of a callable, builtin type.If [^F] is no callable, builtin type, any attempt to access thesequence results in a compile error.[endsect][section:function_arity function_arity] template<typename F> struct function_arity;[*Header] #include <boost/function_types/function_arity.hpp>[variablelist [[[^F]][Callable builtin type]] [[[^function_arity<F>]][Function arity as __mpl_integral_constant__]] [[[^function_arity<F>::value]][Constant value of the function arity]]]Extracts the function arity, that is the number of parameters. The hidden [^this] of member function pointers counts, in other wordsthe arity value is always greater than or equal to one if [^F] is a member function pointer.If [^F] is no callable, builtin type, any attempt to access thevalue results in a compile error.[endsect][section:components components] template<typename T, class ClassTransform = add_reference<_> > struct components;[*Header] #include <boost/function_types/components.hpp>[variablelist [[[^T]][Type to analyze]] [[[^ClassTransform]] [__mpl_lambda_expression__ to transform the class type if [^T] is a member function pointer]] [[[^components<T,ClassTransform>]] [__mpl_fb_ext_ra_seq__ of all component types and property tag]] [[[^components<T,ClassTransform>::types]] [Decorated MPL Sequence, exposed for optimization]]]Extracts all properties of a callable builtin type, that is the result type,followed by the parameter types (including the type of [^this] for member function pointers).If [^T] is no callable builtin type, the component types are an emptysequence and the Tag's meaning is equivalent to the [^__null_tag].[endsect][endsect] [/ Class templates for type decomposition][/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ][section:synthesis Class templates for type synthesis][section:function_type function_type] template<typename Types, typename Tag = __null_tag> struct function_type;[*Header] #include <boost/function_types/function_type.hpp>[variablelist [[[^Types]][Component types in form of an __mpl_fwd_seq__ or another callable, builtin type]] [[[^Tag]][Further properties]] [[[^function_type<Types,Tag>::type]][Synthesized type]]]Synthesizes a function type from given properties.If the template parameters do not describe a valid type, any attemptto access the [^type] member will result in a compile error.[endsect][section:function_pointer function_pointer] template<typename Types, typename Tag = __null_tag> struct function_pointer;[*Header] #include <boost/function_types/function_pointer.hpp>[variablelist [[[^Types]][Component types in form of an __mpl_fwd_seq__ or another callable, builtin type]] [[[^Tag]][Further properties]] [[[^function_pointer<Types,Tag>::type]][Synthesized type]]]Synthesizes a function pointer type from given properties.If the template parameters do not describe a valid type, any attemptto access the [^type] member will result in a compile error.[endsect][section:function_reference function_reference] template<typename Types, typename Tag = __null_tag> struct function_reference;[*Header] #include <boost/function_types/function_reference.hpp>[variablelist [[[^Types]][Component types in form of an __mpl_fwd_seq__ or another callable, builtin type]] [[[^Tag]][Further properties]] [[[^function_reference<Types,Tag>::type]][Synthesized type]]]Synthesizes a function reference type from given properties.If the template parameters do not describe a valid type, any attemptto access the [^type] member will result in a compile error.[endsect][section:member_function_pointer member_function_pointer] template<typename Types, typename Tag = __null_tag> struct member_function_pointer;[*Header] #include <boost/function_types/member_function_pointer.hpp>[variablelist [[[^Types]][Component types in form of an __mpl_fwd_seq__ or another callable, builtin type]] [[[^Tag]][Further properties]] [[[^member_function_pointer<Types,Tag>::type]][Synthesized type]]]Synthesizes a member function pointer type from given properties.An optional reference or possibly cv-qualified pointer is removed fromthe second type in the sequence to determine the the class type. The cv-qualification of the resulting type applies to the memberfunction, unless otherwise explicitly specified by the property tag.If the template parameters do not describe a valid type, any attemptto access the [^type] member will result in a compile error.[endsect][endsect] [/ Class templates for type synthesis ][/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ][section:tag_types Tag Types][section:variadic variadic] typedef __unspecified__ variadic;[*Header] #include <boost/function_types/property_tags.hpp>States that a function type takes a variable number of arguments through an ellipsis parameter (such as [^printf]).[endsect][section:non_variadic non_variadic] typedef __unspecified__ non_variadic;[*Header] #include <boost/function_types/property_tags.hpp>States that a function type does not have an ellipsis parameter.[endsect][section:default_cc default_cc] typedef __unspecified__ default_cc;[*Header] #include <boost/function_types/property_tags.hpp>States that a function type encodes the default calling convention.[endsect][section:const_qualified const_qualified] typedef __unspecified__ const_qualified;[*Header] #include <boost/function_types/property_tags.hpp>States that a function type is const qualified.[endsect][section:non_const non_const] typedef __unspecified__ non_const;[*Header] #include <boost/function_types/property_tags.hpp>States that a function type is not const qualified.[endsect][section:volatile_qualified volatile_qualified] typedef __unspecified__ volatile_qualified;[*Header] #include <boost/function_types/property_tags.hpp>States that a function type is volatile qualified.[endsect]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -