diff --git a/test/for_each.cpp b/test/for_each.cpp index b4b30f7..60b1f7d 100644 --- a/test/for_each.cpp +++ b/test/for_each.cpp @@ -50,16 +50,22 @@ int main() typedef mpl::list types; mpl::for_each< types,mpl::make_identity<_> >(printer(std::cout)); -#if !defined(__BORLANDC__) || __BORLANDC__ != 0x560 typedef mpl::range_c numbers; std::vector v; + +#if !defined(__BORLANDC__) && (__BORLANDC__ >= 0x561 && !defined(BOOST_STRICT_CONFIG)) mpl::for_each( boost::bind(&std::vector::push_back, &v, _1) + ); +#else + void (std::vector::* push_back)(int const&) = &std::vector::push_back; + mpl::for_each( + boost::bind(push_back, &v, _1) ); - +#endif + for (int i = 0; i < v.size(); ++i) assert(v[i] == i); -#endif return 0; }