// Copyright 2015 Antony Polukhin. // // Distributed under 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) #ifndef BOOST_DLL_DETAIL_STRIP_CALLING_CONVENTION_HPP #define BOOST_DLL_DETAIL_STRIP_CALLING_CONVENTION_HPP #include #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif namespace boost { namespace dll { namespace detail { template struct strip_calling_convention { typedef T type; }; #ifdef _MSC_VER // stripping __fastcall template struct strip_calling_convention { typedef Ret(type)(Arg1); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4, Arg5); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9); }; // stripping __stdall template struct strip_calling_convention { typedef Ret(type)(Arg1); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4, Arg5); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8); }; template struct strip_calling_convention { typedef Ret(type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9); }; #ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES // Some of the MSVC versions have issues in variadic templates implementation. // So we leave previous specializations visible even if variadic templates are allowed template struct strip_calling_convention { typedef Ret(type)(Args...); }; template struct strip_calling_convention { typedef Ret(type)(Args...); }; #endif // #ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif // #ifdef _MSC_VER }}} // namespace boost::dll::detail #endif // #ifndef BOOST_DLL_DETAIL_STRIP_CALLING_CONVENTION_HPP