mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-16 05:42:20 +02:00
Changes the test cases, as the behaviour about const-qualifier for
attribute_type and attribute_const_type when type is deduced can be different than when the type is provided. Indeed when specifying attribute_type and attribute_const_type manually it's possible to provide a type which isn't const qualified as attribute_const_type. When deducing the types from the get_expr, a const and a non const qualified type is taken respectively for attribute_type and attribute_const_type.
This commit is contained in:
@ -102,9 +102,9 @@ namespace ns
|
||||
#if BOOST_PP_VARIADICS
|
||||
BOOST_FUSION_ADAPT_ADT(
|
||||
ns::point,
|
||||
(BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_x(), obj.set_x(val))
|
||||
(obj.get_y(), obj.set_y(val))
|
||||
(int, int, obj.get_z(), obj.set_z(val))
|
||||
(int, int, obj.get_x(), obj.set_x(val))
|
||||
(BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_y(), obj.set_y(val))
|
||||
(obj.get_z(), obj.set_z(val))
|
||||
)
|
||||
|
||||
# if !BOOST_WORKAROUND(__GNUC__,<4)
|
||||
@ -255,6 +255,7 @@ main()
|
||||
#endif
|
||||
|
||||
{
|
||||
// Check types provided in case it's provided
|
||||
BOOST_MPL_ASSERT((
|
||||
boost::is_same<
|
||||
boost::fusion::result_of::front<ns::point>::type,
|
||||
@ -275,6 +276,28 @@ main()
|
||||
boost::fusion::result_of::front<ns::point const>::type::type,
|
||||
int
|
||||
>));
|
||||
|
||||
// Check types provided in case it's deduced
|
||||
BOOST_MPL_ASSERT((
|
||||
boost::is_same<
|
||||
boost::fusion::result_of::back<ns::point>::type,
|
||||
boost::fusion::extension::adt_attribute_proxy<ns::point,2,false>
|
||||
>));
|
||||
BOOST_MPL_ASSERT((
|
||||
boost::is_same<
|
||||
boost::fusion::result_of::back<ns::point>::type::type,
|
||||
int
|
||||
>));
|
||||
BOOST_MPL_ASSERT((
|
||||
boost::is_same<
|
||||
boost::fusion::result_of::back<ns::point const>::type,
|
||||
boost::fusion::extension::adt_attribute_proxy<ns::point,2,true>
|
||||
>));
|
||||
BOOST_MPL_ASSERT((
|
||||
boost::is_same<
|
||||
boost::fusion::result_of::back<ns::point const>::type::type,
|
||||
const int
|
||||
>));
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
|
Reference in New Issue
Block a user