Index: requires.hpp =================================================================== --- requires.hpp (revision 64789) +++ requires.hpp (working copy) @@ -50,6 +50,28 @@ # define BOOST_CONCEPT_REQUIRES(models, result) \ typename ::boost::parameter::aux::unaryfunptr_arg_type::type +// Fix for forward declarations of template functions not working on MSVC when the +// return type depends on complex types with non-type template arguments +#elif BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600)) + +template +struct requires_msvc_workaround +{ + typedef typename T2::type type; + enum{value = T1::value }; +}; + +#define BOOST_CONCEPT_CLOSE_TEMPLATE(r, data, elem) > +#define BOOST_CONCEPT_OPEN_TEMPLATE(r, data, elem) \ + ::boost::requires_msvc_workaround< ::boost::_requires_ , + +#define BOOST_CONCEPT_REQUIRES(models , result) \ + typename \ + BOOST_PP_SEQ_FOR_EACH(BOOST_CONCEPT_OPEN_TEMPLATE, 0, models) \ + ::boost::parameter::aux::unaryfunptr_arg_type \ + BOOST_PP_SEQ_FOR_EACH(BOOST_CONCEPT_CLOSE_TEMPLATE, 0, models) \ + ::type + #elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // Same thing as below without the initial typename