8#ifndef INCLUDED_BSLMF_FUNCTIONPOINTERTRAITS
9#define INCLUDED_BSLMF_FUNCTIONPOINTERTRAITS
100#include <bslscm_version.h>
108#if BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
112# define COMPILING_BSLMF_FUNCTIONPOINTERTRAITS_H
114# undef COMPILING_BSLMF_FUNCTIONPOINTERTRAITS_H
136template <
class t_PROTOTYPE>
149template <
class t_PROTOTYPE>
153 FunctionPointerTraits<t_PROTOTYPE>::IS_FUNCTION_POINTER> {
158#if defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT_TYPES) && \
159 !defined(BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES)
163# error Feature not supported for compilers without variadic templates
170#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
174#if defined(BSLS_PLATFORM_CMP_CLANG) && (!defined(BSLS_PLATFORM_OS_DARWIN) \
175 || BSLS_PLATFORM_CMP_VER_MAJOR > 130000)
176#pragma clang diagnostic push
177#pragma clang diagnostic ignored "-Wdeprecated-volatile"
182template <
class t_BSLMF_RETURN,
class... t_ARGS>
186 IS_FUNCTION_POINTER = 1,
189 enum { e_IS_VARARG = 0 };
198template <
class t_BSLMF_RETURN,
class... t_ARGS>
202 IS_FUNCTION_POINTER = 1,
205 enum { e_IS_VARARG = 1 };
212#if defined(BSLS_PLATFORM_CMP_CLANG)
213#pragma clang diagnostic pop
218#if defined(BSLS_PLATFORM_CMP_MSVC)
225template <
class t_PROTOTYPE>
234template <
class t_PROTOTYPE>
235struct FunctionPointerTraits<t_PROTOTYPE volatile>
236: FunctionPointerTraits<t_PROTOTYPE> {
243template <
class t_PROTOTYPE>
244struct FunctionPointerTraits<t_PROTOTYPE const volatile>
245: FunctionPointerTraits<t_PROTOTYPE> {
256template <
class t_PROTOTYPE>
265template <
class t_PROTOTYPE>
274template <
class t_PROTOTYPE>
281#ifdef BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT_TYPES
283#if defined(BSLS_PLATFORM_CMP_CLANG)
284#pragma clang diagnostic push
285#pragma clang diagnostic ignored "-Wdeprecated-volatile"
290template <
class t_BSLMF_RETURN,
class... t_ARGS>
294 IS_FUNCTION_POINTER = 1,
297 enum { e_IS_VARARG = 0 };
298 typedef t_BSLMF_RETURN ResultType;
299 typedef typename TypeList<t_ARGS...>::Type ArgumentList;
300 typedef t_BSLMF_RETURN FuncType(t_ARGS...) noexcept;
301 typedef FunctionPointerCPlusPlusLinkage Linkage;
307template <class t_BSLMF_RETURN, class... t_ARGS>
308struct FunctionPointerTraits<t_BSLMF_RETURN (*)(t_ARGS...,...) noexcept> {
311 IS_FUNCTION_POINTER = 1,
314 enum { e_IS_VARARG = 1 };
315 typedef t_BSLMF_RETURN ResultType;
316 typedef typename TypeList<t_ARGS...>::Type ArgumentList;
317 typedef t_BSLMF_RETURN FuncType(t_ARGS...,...) noexcept;
318 typedef FunctionPointerCPlusPlusLinkage Linkage;
321#if defined(BSLS_PLATFORM_CMP_CLANG)
322#pragma clang diagnostic pop
329#ifndef BDE_OPENSOURCE_PUBLICATION
341#ifdef bslmf_FunctionPointerTraits
342#undef bslmf_FunctionPointerTraits
345#define bslmf_FunctionPointerTraits bslmf::FunctionPointerTraits
347#ifdef bslmf_IsFunctionPointer
348#undef bslmf_IsFunctionPointer
351#define bslmf_IsFunctionPointer bslmf::IsFunctionPointer
bslmf::FunctionPointerCLinkage bslmf_FunctionPointerCLinkage
This alias is defined for backward compatibility.
Definition bslmf_functionpointertraits.h:339
bslmf::FunctionPointerCPlusPlusLinkage bslmf_FunctionPointerCPlusPlusLinkage
This alias is defined for backward compatibility.
Definition bslmf_functionpointertraits.h:336
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlbb_blob.h:576
Definition bslmf_integralconstant.h:244
C function pointer linkage tag.
Definition bslmf_functionpointertraits.h:125
C++ function pointer linkage tag.
Definition bslmf_functionpointertraits.h:121
TypeList< t_ARGS... >::Type ArgumentList
Definition bslmf_functionpointertraits.h:207
t_BSLMF_RETURN FuncType(t_ARGS...,...)
Definition bslmf_functionpointertraits.h:208
t_BSLMF_RETURN ResultType
Definition bslmf_functionpointertraits.h:206
FunctionPointerCPlusPlusLinkage Linkage
Definition bslmf_functionpointertraits.h:209
TypeList< t_ARGS... >::Type ArgumentList
Definition bslmf_functionpointertraits.h:191
t_BSLMF_RETURN ResultType
Definition bslmf_functionpointertraits.h:190
t_BSLMF_RETURN FuncType(t_ARGS...)
Definition bslmf_functionpointertraits.h:192
FunctionPointerCPlusPlusLinkage Linkage
Definition bslmf_functionpointertraits.h:193
Definition bslmf_functionpointertraits.h:137
@ IS_FUNCTION_POINTER
Definition bslmf_functionpointertraits.h:139
Definition bslmf_functionpointertraits.h:153
Definition bslmf_typelist.h:1609