mirror of
https://github.com/boostorg/type_traits.git
synced 2025-07-31 13:07:22 +02:00
Merge pull request #85 from boostorg/issue6
Big update for is_function and is_member_function_pointer for modern …
This commit is contained in:
@ -78,6 +78,15 @@
|
||||
#undef BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION
|
||||
#endif
|
||||
|
||||
//
|
||||
// Can we implement accurate is_function/is_member_function_pointer (post C++03)?
|
||||
//
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !BOOST_WORKAROUND(BOOST_GCC, <= 40800)\
|
||||
&& !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(__clang_major__, <= 4)
|
||||
# define BOOST_TT_HAS_ASCCURATE_IS_FUNCTION
|
||||
#endif
|
||||
|
||||
|
||||
#endif // BOOST_TT_CONFIG_HPP_INCLUDED
|
||||
|
||||
|
||||
|
108
include/boost/type_traits/detail/is_function_cxx_03.hpp
Normal file
108
include/boost/type_traits/detail/is_function_cxx_03.hpp
Normal file
@ -0,0 +1,108 @@
|
||||
|
||||
// Copyright 2000 John Maddock (john@johnmaddock.co.uk)
|
||||
// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com)
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_IS_FUNCTION_CXX_03_HPP_INCLUDED
|
||||
#define BOOST_TT_IS_FUNCTION_CXX_03_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
|
||||
#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
|
||||
# include <boost/type_traits/detail/is_function_ptr_helper.hpp>
|
||||
#else
|
||||
# include <boost/type_traits/detail/is_function_ptr_tester.hpp>
|
||||
# include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
#endif
|
||||
|
||||
// is a type a function?
|
||||
// Please note that this implementation is unnecessarily complex:
|
||||
// we could just use !is_convertible<T*, const volatile void*>::value,
|
||||
// except that some compilers erroneously allow conversions from
|
||||
// function pointers to void*.
|
||||
|
||||
namespace boost {
|
||||
|
||||
#if !defined( __CODEGEARC__ )
|
||||
|
||||
namespace detail {
|
||||
|
||||
#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
|
||||
template<bool is_ref = true>
|
||||
struct is_function_chooser
|
||||
{
|
||||
template< typename T > struct result_
|
||||
: public false_type {};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_function_chooser<false>
|
||||
{
|
||||
template< typename T > struct result_
|
||||
: public ::boost::type_traits::is_function_ptr_helper<T*> {};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_function_impl
|
||||
: public is_function_chooser< ::boost::is_reference<T>::value >
|
||||
::BOOST_NESTED_TEMPLATE result_<T>
|
||||
{
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template <typename T>
|
||||
struct is_function_impl
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:6334)
|
||||
#endif
|
||||
static T* t;
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t))
|
||||
== sizeof(::boost::type_traits::yes_type)
|
||||
);
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_function_impl<T&> : public false_type
|
||||
{};
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <typename T>
|
||||
struct is_function_impl<T&&> : public false_type
|
||||
{};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
#endif // !defined( __CODEGEARC__ )
|
||||
|
||||
#if defined( __CODEGEARC__ )
|
||||
template <class T> struct is_function : integral_constant<bool, __is_function(T)> {};
|
||||
#else
|
||||
template <class T> struct is_function : integral_constant<bool, ::boost::detail::is_function_impl<T>::value> {};
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <class T> struct is_function<T&&> : public false_type {};
|
||||
#endif
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
|
||||
template <class T> struct is_function<T&> : public false_type {};
|
||||
#endif
|
||||
#endif
|
||||
} // namespace boost
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1700)
|
||||
#include <boost/type_traits/detail/is_function_msvc10_fix.hpp>
|
||||
#endif
|
||||
|
||||
#endif // BOOST_TT_IS_FUNCTION_CXX_03_HPP_INCLUDED
|
501
include/boost/type_traits/detail/is_function_cxx_11.hpp
Normal file
501
include/boost/type_traits/detail/is_function_cxx_11.hpp
Normal file
@ -0,0 +1,501 @@
|
||||
|
||||
// Copyright 2000 John Maddock (john@johnmaddock.co.uk)
|
||||
// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com)
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED
|
||||
#define BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
template <class T>
|
||||
struct is_function : public false_type {};
|
||||
|
||||
#if defined(__cpp_noexcept_function_type) && !defined(_MSC_VER)
|
||||
#define BOOST_TT_NOEXCEPT_PARAM , bool NE
|
||||
#define BOOST_TT_NOEXCEPT_DECL noexcept(NE)
|
||||
#else
|
||||
#define BOOST_TT_NOEXCEPT_PARAM
|
||||
#define BOOST_TT_NOEXCEPT_DECL
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define BOOST_TT_DEF_CALL __cdecl
|
||||
#else
|
||||
#define BOOST_TT_DEF_CALL
|
||||
#endif
|
||||
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// Reference qualified:
|
||||
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// rvalue reference qualified:
|
||||
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)&& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)&& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// reference qualified:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// rvalue reference qualified:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
||||
// All over again for msvc with noexcept:
|
||||
|
||||
#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703)
|
||||
|
||||
#undef BOOST_TT_NOEXCEPT_DECL
|
||||
#define BOOST_TT_NOEXCEPT_DECL noexcept
|
||||
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// Reference qualified:
|
||||
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// rvalue reference qualified:
|
||||
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret(Args..., ...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// reference qualified:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// rvalue reference qualified:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __clrcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __stdcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __fastcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_function<Ret __vectorcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#undef BOOST_TT_NOEXCEPT_DECL
|
||||
#undef BOOST_TT_NOEXCEPT_PARAM
|
||||
#undef BOOST_TT_DEF_CALL
|
||||
|
||||
#endif // BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED
|
||||
|
@ -0,0 +1,117 @@
|
||||
|
||||
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
|
||||
// Hinnant & John Maddock 2000.
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
|
||||
#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_03_HPP_INCLUDED
|
||||
#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_03_HPP_INCLUDED
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
|
||||
//
|
||||
// Note: we use the "workaround" version for MSVC because it works for
|
||||
// __stdcall etc function types, where as the partial specialisation
|
||||
// version does not do so.
|
||||
//
|
||||
# include <boost/type_traits/detail/is_mem_fun_pointer_impl.hpp>
|
||||
# include <boost/type_traits/remove_cv.hpp>
|
||||
# include <boost/type_traits/integral_constant.hpp>
|
||||
#else
|
||||
# include <boost/type_traits/is_reference.hpp>
|
||||
# include <boost/type_traits/is_array.hpp>
|
||||
# include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
# include <boost/type_traits/detail/is_mem_fun_pointer_tester.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
||||
#if defined( __CODEGEARC__ )
|
||||
template <class T> struct is_member_function_pointer : public integral_constant<bool, __is_member_function_pointer( T )> {};
|
||||
#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
|
||||
|
||||
template <class T> struct is_member_function_pointer
|
||||
: public ::boost::integral_constant<bool, ::boost::type_traits::is_mem_fun_pointer_impl<typename remove_cv<T>::type>::value>{};
|
||||
|
||||
#else
|
||||
|
||||
namespace detail {
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
|
||||
template <bool>
|
||||
struct is_mem_fun_pointer_select
|
||||
{
|
||||
template <class T> struct result_ : public false_type{};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_mem_fun_pointer_select<false>
|
||||
{
|
||||
template <typename T> struct result_
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:6334)
|
||||
#endif
|
||||
static T* make_t;
|
||||
typedef result_<T> self_type;
|
||||
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value = (
|
||||
1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t))
|
||||
));
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_member_function_pointer_impl
|
||||
: public is_mem_fun_pointer_select<
|
||||
::boost::is_reference<T>::value || ::boost::is_array<T>::value>::template result_<T>{};
|
||||
|
||||
template <typename T>
|
||||
struct is_member_function_pointer_impl<T&> : public false_type{};
|
||||
|
||||
#else // Borland C++
|
||||
|
||||
template <typename T>
|
||||
struct is_member_function_pointer_impl
|
||||
{
|
||||
static T* m_t;
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value =
|
||||
(1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) );
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_member_function_pointer_impl<T&>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template<> struct is_member_function_pointer_impl<void> : public false_type{};
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
template<> struct is_member_function_pointer_impl<void const> : public false_type{};
|
||||
template<> struct is_member_function_pointer_impl<void const volatile> : public false_type{};
|
||||
template<> struct is_member_function_pointer_impl<void volatile> : public false_type{};
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <class T>
|
||||
struct is_member_function_pointer
|
||||
: public integral_constant<bool, ::boost::detail::is_member_function_pointer_impl<T>::value>{};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
|
@ -0,0 +1,557 @@
|
||||
|
||||
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
|
||||
// Hinnant & John Maddock 2000.
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
|
||||
#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_11_HPP_INCLUDED
|
||||
#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_11_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define BOOST_TT_DEF_CALL __thiscall
|
||||
#else
|
||||
#define BOOST_TT_DEF_CALL
|
||||
#endif
|
||||
|
||||
|
||||
template <class T>
|
||||
struct is_member_function_pointer : public false_type {};
|
||||
template <class T>
|
||||
struct is_member_function_pointer<T const> : public is_member_function_pointer<T> {};
|
||||
template <class T>
|
||||
struct is_member_function_pointer<T volatile> : public is_member_function_pointer<T> {};
|
||||
template <class T>
|
||||
struct is_member_function_pointer<T const volatile> : public is_member_function_pointer<T> {};
|
||||
|
||||
#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703)
|
||||
// MSVC can't handle noexcept(b) as a deduced template parameter
|
||||
// so we will have to write everything out :(
|
||||
#define BOOST_TT_NOEXCEPT_PARAM
|
||||
#define BOOST_TT_NOEXCEPT_DECL
|
||||
#elif defined(__cpp_noexcept_function_type)
|
||||
#define BOOST_TT_NOEXCEPT_PARAM , bool NE
|
||||
#define BOOST_TT_NOEXCEPT_DECL noexcept(NE)
|
||||
#else
|
||||
#define BOOST_TT_NOEXCEPT_PARAM
|
||||
#define BOOST_TT_NOEXCEPT_DECL
|
||||
#endif
|
||||
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (C::*)(Args..., ...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// Reference qualified:
|
||||
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// rvalue reference qualified:
|
||||
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// reference qualified:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// rvalue reference qualified:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703)
|
||||
|
||||
#undef BOOST_TT_NOEXCEPT_DECL
|
||||
#define BOOST_TT_NOEXCEPT_DECL noexcept
|
||||
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// Reference qualified:
|
||||
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// rvalue reference qualified:
|
||||
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const qualified:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// reference qualified:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
|
||||
// rvalue reference qualified:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
// const volatile:
|
||||
#ifdef __CLR_VER
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret __clrcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
#ifndef _M_AMD64
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
|
||||
struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#undef BOOST_TT_NOEXCEPT_DECL
|
||||
#undef BOOST_TT_NOEXCEPT_PARAM
|
||||
#undef BOOST_TT_DEF_CALL
|
||||
}
|
||||
|
||||
#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_11_HPP_INCLUDED
|
@ -20,6 +20,7 @@
|
||||
#if defined(BOOST_MSVC) || defined(BOOST_INTEL)
|
||||
#include <boost/type_traits/is_pod.hpp>
|
||||
#include <boost/type_traits/is_volatile.hpp>
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
|
@ -11,100 +11,17 @@
|
||||
#ifndef BOOST_TT_IS_FUNCTION_HPP_INCLUDED
|
||||
#define BOOST_TT_IS_FUNCTION_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
#include <boost/type_traits/detail/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
|
||||
# include <boost/type_traits/detail/is_function_ptr_helper.hpp>
|
||||
#else
|
||||
# include <boost/type_traits/detail/is_function_ptr_tester.hpp>
|
||||
# include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
#endif
|
||||
#ifdef BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION
|
||||
|
||||
// is a type a function?
|
||||
// Please note that this implementation is unnecessarily complex:
|
||||
// we could just use !is_convertible<T*, const volatile void*>::value,
|
||||
// except that some compilers erroneously allow conversions from
|
||||
// function pointers to void*.
|
||||
|
||||
namespace boost {
|
||||
|
||||
#if !defined( __CODEGEARC__ )
|
||||
|
||||
namespace detail {
|
||||
|
||||
#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
|
||||
template<bool is_ref = true>
|
||||
struct is_function_chooser
|
||||
{
|
||||
template< typename T > struct result_
|
||||
: public false_type {};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_function_chooser<false>
|
||||
{
|
||||
template< typename T > struct result_
|
||||
: public ::boost::type_traits::is_function_ptr_helper<T*> {};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_function_impl
|
||||
: public is_function_chooser< ::boost::is_reference<T>::value >
|
||||
::BOOST_NESTED_TEMPLATE result_<T>
|
||||
{
|
||||
};
|
||||
#include <boost/type_traits/detail/is_function_cxx_11.hpp>
|
||||
|
||||
#else
|
||||
|
||||
template <typename T>
|
||||
struct is_function_impl
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:6334)
|
||||
#endif
|
||||
static T* t;
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t))
|
||||
== sizeof(::boost::type_traits::yes_type)
|
||||
);
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
};
|
||||
#include <boost/type_traits/detail/is_function_cxx_03.hpp>
|
||||
|
||||
template <typename T>
|
||||
struct is_function_impl<T&> : public false_type
|
||||
{};
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <typename T>
|
||||
struct is_function_impl<T&&> : public false_type
|
||||
{};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
#endif // !defined( __CODEGEARC__ )
|
||||
|
||||
#if defined( __CODEGEARC__ )
|
||||
template <class T> struct is_function : integral_constant<bool, __is_function(T)> {};
|
||||
#else
|
||||
template <class T> struct is_function : integral_constant<bool, ::boost::detail::is_function_impl<T>::value> {};
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <class T> struct is_function<T&&> : public false_type {};
|
||||
#endif
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
|
||||
template <class T> struct is_function<T&> : public false_type {};
|
||||
#endif
|
||||
#endif
|
||||
} // namespace boost
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1700)
|
||||
#include <boost/type_traits/detail/is_function_msvc10_fix.hpp>
|
||||
#endif
|
||||
|
||||
#endif // BOOST_TT_IS_FUNCTION_HPP_INCLUDED
|
||||
|
@ -12,109 +12,15 @@
|
||||
#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/detail/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
|
||||
//
|
||||
// Note: we use the "workaround" version for MSVC because it works for
|
||||
// __stdcall etc function types, where as the partial specialisation
|
||||
// version does not do so.
|
||||
//
|
||||
# include <boost/type_traits/detail/is_mem_fun_pointer_impl.hpp>
|
||||
# include <boost/type_traits/remove_cv.hpp>
|
||||
# include <boost/type_traits/integral_constant.hpp>
|
||||
#else
|
||||
# include <boost/type_traits/is_reference.hpp>
|
||||
# include <boost/type_traits/is_array.hpp>
|
||||
# include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
# include <boost/type_traits/detail/is_mem_fun_pointer_tester.hpp>
|
||||
#endif
|
||||
#ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION
|
||||
|
||||
namespace boost {
|
||||
|
||||
#if defined( __CODEGEARC__ )
|
||||
template <class T> struct is_member_function_pointer : public integral_constant<bool, __is_member_function_pointer( T )> {};
|
||||
#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
|
||||
|
||||
template <class T> struct is_member_function_pointer
|
||||
: public ::boost::integral_constant<bool, ::boost::type_traits::is_mem_fun_pointer_impl<typename remove_cv<T>::type>::value>{};
|
||||
#include <boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp>
|
||||
|
||||
#else
|
||||
|
||||
namespace detail {
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
|
||||
template <bool>
|
||||
struct is_mem_fun_pointer_select
|
||||
{
|
||||
template <class T> struct result_ : public false_type{};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_mem_fun_pointer_select<false>
|
||||
{
|
||||
template <typename T> struct result_
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:6334)
|
||||
#endif
|
||||
static T* make_t;
|
||||
typedef result_<T> self_type;
|
||||
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value = (
|
||||
1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t))
|
||||
));
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_member_function_pointer_impl
|
||||
: public is_mem_fun_pointer_select<
|
||||
::boost::is_reference<T>::value || ::boost::is_array<T>::value>::template result_<T>{};
|
||||
|
||||
template <typename T>
|
||||
struct is_member_function_pointer_impl<T&> : public false_type{};
|
||||
|
||||
#else // Borland C++
|
||||
|
||||
template <typename T>
|
||||
struct is_member_function_pointer_impl
|
||||
{
|
||||
static T* m_t;
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value =
|
||||
(1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) );
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_member_function_pointer_impl<T&>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
#include <boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
template<> struct is_member_function_pointer_impl<void> : public false_type{};
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
template<> struct is_member_function_pointer_impl<void const> : public false_type{};
|
||||
template<> struct is_member_function_pointer_impl<void const volatile> : public false_type{};
|
||||
template<> struct is_member_function_pointer_impl<void volatile> : public false_type{};
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <class T>
|
||||
struct is_member_function_pointer
|
||||
: public integral_constant<bool, ::boost::detail::is_member_function_pointer_impl<T>::value>{};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
|
||||
|
@ -12,6 +12,30 @@
|
||||
#include "test.hpp"
|
||||
#include "check_integral_constant.hpp"
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 70000)
|
||||
#pragma GCC diagnostic ignored "-Wnoexcept-type"
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION
|
||||
|
||||
struct X
|
||||
{
|
||||
void f() {}
|
||||
void fc() const {}
|
||||
void fv() volatile {}
|
||||
void fcv() const volatile {}
|
||||
void noexcept_f()noexcept {}
|
||||
void ref_f()const& {}
|
||||
void rvalue_f() && {}
|
||||
};
|
||||
|
||||
template< class C, class F > void test_cv_qual(F C::*)
|
||||
{
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(boost::is_function< F >::value, true);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
TT_TEST_BEGIN(is_function)
|
||||
|
||||
typedef void foo0_t();
|
||||
@ -72,6 +96,18 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<sfoo4_t>::value, true);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION
|
||||
|
||||
test_cv_qual(&X::f);
|
||||
test_cv_qual(&X::fc);
|
||||
test_cv_qual(&X::fv);
|
||||
test_cv_qual(&X::fcv);
|
||||
test_cv_qual(&X::noexcept_f);
|
||||
test_cv_qual(&X::ref_f);
|
||||
test_cv_qual(&X::rvalue_f);
|
||||
|
||||
#endif
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
@ -12,6 +12,28 @@
|
||||
#include "test.hpp"
|
||||
#include "check_integral_constant.hpp"
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 70000)
|
||||
#pragma GCC diagnostic ignored "-Wnoexcept-type"
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION
|
||||
struct tricky_members
|
||||
{
|
||||
void noexcept_proc()noexcept
|
||||
{}
|
||||
void const_ref_proc()const &
|
||||
{}
|
||||
void rvalue_proc()&&
|
||||
{}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
void test_tricky(T)
|
||||
{
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<T>::value, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
TT_TEST_BEGIN(is_member_function_pointer)
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<f1>::value, false);
|
||||
@ -53,12 +75,12 @@ typedef void (__cdecl test_abc1::*ccall_proc)(int, long, double);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<ccall_proc>::value, true);
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION
|
||||
test_tricky(&tricky_members::const_ref_proc);
|
||||
test_tricky(&tricky_members::noexcept_proc);
|
||||
test_tricky(&tricky_members::rvalue_proc);
|
||||
#endif
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user