I'm trying to synthesize a function type G from another function type F with
some changes on return and arg types. What I need to remain constant, are
all these additional properties that are returned by components<F>::tag. I
want them all as a bunch, don't really fancy querying them all one by one,
they sorta look contradictive or at least redundant.
The simple approach of passing the same tag to the function_type
does not make a change -
it leads to the same result as if null_tag were passed.
How do you generate a function type with the same properties as the given
one?
Sample code:
//--------------------------------------------------------------------------------------------------
typedef int (__stdcall * pfn1)(char);
typedef int ( * pfn2)(char);
typedef remove_pointer<pfn1>::type fn1;
typedef ft::components<fn1> comps1;
// generate type hopefully like pfn1
typedef ft::function_pointer
>::type pfn_gen1;
BOOST_MPL_ASSERT((is_same)); // this one
passes, should fail, though
BOOST_MPL_ASSERT((is_same)); // I wish,
but fails
//--------------------------------------------------------------------------------------------------
--
View this message in context: http://www.nabble.com/-boost-users--function_types--Function-synthesis-and-p...
Sent from the Boost - Users mailing list archive at Nabble.com.