| 53 | // Fix for forward declarations of template functions not working on MSVC when the |
| 54 | // return type depends on complex types with non-type template arguments |
| 55 | #elif BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600)) |
| 56 | |
| 57 | template <typename T1, typename T2> |
| 58 | struct requires_msvc_workaround |
| 59 | { |
| 60 | typedef typename T2::type type; |
| 61 | enum{value = T1::value }; |
| 62 | }; |
| 63 | |
| 64 | #define BOOST_CONCEPT_CLOSE_TEMPLATE(r, data, elem) > |
| 65 | #define BOOST_CONCEPT_OPEN_TEMPLATE(r, data, elem) \ |
| 66 | ::boost::requires_msvc_workaround< ::boost::_requires_<void(*) elem > , |
| 67 | |
| 68 | #define BOOST_CONCEPT_REQUIRES(models , result) \ |
| 69 | typename \ |
| 70 | BOOST_PP_SEQ_FOR_EACH(BOOST_CONCEPT_OPEN_TEMPLATE, 0, models) \ |
| 71 | ::boost::parameter::aux::unaryfunptr_arg_type<void(*) result> \ |
| 72 | BOOST_PP_SEQ_FOR_EACH(BOOST_CONCEPT_CLOSE_TEMPLATE, 0, models) \ |
| 73 | ::type |
| 74 | |