diff --git a/include/boost/fusion/adapted/adt/detail/adapt_base.hpp b/include/boost/fusion/adapted/adt/detail/adapt_base.hpp index 80a62b3e..c1c78962 100644 --- a/include/boost/fusion/adapted/adt/detail/adapt_base.hpp +++ b/include/boost/fusion/adapted/adt/detail/adapt_base.hpp @@ -84,7 +84,7 @@ BOOST_PP_IF(DEDUCE_TYPE, \ BOOST_FUSION_ADT_ATTRIBUTE_TYPEOF, \ BOOST_FUSION_ADT_ATTRIBUTE_GIVENTYPE \ - )(NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE) /* XXX: Check PROXY PREFIX */\ + )(NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE) \ \ template \ BOOST_FUSION_GPU_ENABLED \ @@ -98,7 +98,7 @@ } \ \ BOOST_FUSION_GPU_ENABLED \ - static type /* TODO: Check Type here */ \ + static type \ boost_fusion_adapt_adt_impl_get( \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj) \ { \ @@ -107,7 +107,7 @@ } \ \ BOOST_FUSION_GPU_ENABLED \ - static const_type /* TODO: check Const Type here */ \ + static const_type \ boost_fusion_adapt_adt_impl_get( \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& obj) \ { \ @@ -128,7 +128,7 @@ typedef typename access::adt_attribute_access< \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ , I \ - >::const_type type; /* TODO: check const Type here */ \ + >::const_type type; \ \ BOOST_FUSION_GPU_ENABLED \ explicit \ @@ -167,7 +167,7 @@ typedef typename access::adt_attribute_access< \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ , I \ - >::type type; /* TODO: check Type here */ \ + >::type type; \ \ BOOST_FUSION_GPU_ENABLED \ explicit \ diff --git a/test/sequence/adapt_adt.cpp b/test/sequence/adapt_adt.cpp index 3a08000f..265cfca5 100644 --- a/test/sequence/adapt_adt.cpp +++ b/test/sequence/adapt_adt.cpp @@ -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::type, @@ -275,6 +276,28 @@ main() boost::fusion::result_of::front::type::type, int >)); + + // Check types provided in case it's deduced + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::back::type, + boost::fusion::extension::adt_attribute_proxy + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::back::type::type, + int + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::back::type, + boost::fusion::extension::adt_attribute_proxy + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::back::type::type, + const int + >)); } return boost::report_errors();