12 char_array
<sizeof(U
)> test(reference_to
<U
>);
15 char_array
<sizeof(U
)> test(const_reference_to
<U
>);
18 char_array
<sizeof(U
)> test(pointer_to
<U
>);
21 char_array
<sizeof(U
)> test(const_pointer_to
<U
>);
24 char_array
<sizeof(U
)> test(value_to
<U
>);
26 BOOST_STATIC_CONSTANT(int, value
= sizeof(test(LUABIND_DECORATE_TYPE(T
))));
30 struct out_value_converter
33 static T
& apply(lua_State
* L
, reference_to
<T
>, int index
)
35 new (m_storage
) T(primitive_param_converter::apply(L
, value_to
<T
>(), index
));
36 return *reinterpret_cast<T
*>(m_storage
);
40 static void postcall(lua_State
* L
, reference_to
<T
>, int)
42 primitive_result_converter::apply(L
, *reinterpret_cast<T
*>(m_storage
));
46 static int match(lua_State
* L
, reference_to
<T
>, int index
)
48 return primitive_param_converter::match(L
, value_to
<T
>(), index
);
55 struct out_value_policy
57 BOOST_STATIC_CONSTANT(int, size
= indirect_sizeof
<T
>::value
);
58 typedef out_value_converter
<size
> type
;
62 struct out_value_policy_gen
64 template<class T
, class Direction
>
65 struct generate_policy
67 typedef typename
mpl::apply_if
<is_same
<Direction
, lua_to_cpp
>