Boost logo

Boost :

Subject: Re: [boost] [function_types] synthesis & explicit calling convention
From: Edward Diener (eldiener_at_[hidden])
Date: 2014-07-25 00:09:53


On 6/10/2014 10:20 AM, Domagoj Saric wrote:
>
> I am unable to synthesize a pointer to a function (or a function type)
> with the fastcall (or any other, explicitly specified) calling convention.
>
> MSVC10 SP1:
>
> **
>
> #define BOOST_FT_COMMON_X86_CCs
> #include "boost/function_types/function_pointer.hpp"
> #include "boost/function_types/property_tags.hpp"
>
> causes error C1017: invalid integer constant expression
> boost\boost_1_55_0\boost\function_types\detail\pp_cc_loop\preprocessed.hpp
> 28
>
> **
>
> doing
> #define BOOST_FT_COMMON_X86_CCs 1

This is evidently the correct form. The documentation should say that
the macro should be defined as 1.

> (contrary to documentation but suggested in some places)
> and including
> #include <boost/function_types/config/config.hpp>
> fixes the above compiler error but then the actual
>
> typedef typename boost::function_types::function_pointer
> <
> MyParameterTypeList,
> boost::function_types::tag<boost::function_types::non_variadic,
> boost::function_types::fast_cc>

Please try:

         boost::function_types::tag<boost::function_types::non_variadic,
boost::function_types::fastcall_cc>

instead.

> >::type MyFunctionPointerType;
>
> fails with error C2065: 'fast_cc' : undeclared identifier
>
>
> help..please? :)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk