diff --git a/include/boost/iterator_adaptors.hpp b/include/boost/iterator_adaptors.hpp index 5f8b378..2185768 100644 --- a/include/boost/iterator_adaptors.hpp +++ b/include/boost/iterator_adaptors.hpp @@ -559,7 +559,7 @@ namespace detail { struct find_param; struct find_param_continue { - template struct bind { + template struct select { typedef typename AssocList::first_type Head; typedef typename Head::first_type Key1; typedef typename Head::second_type Value; @@ -571,7 +571,7 @@ namespace detail { }; struct find_param_end { template - struct bind { typedef detail::default_argument type; }; + struct select { typedef detail::default_argument type; }; }; template struct find_param_helper1 { typedef find_param_continue type; }; @@ -581,7 +581,7 @@ namespace detail { template struct find_param { typedef typename find_param_helper1::type select1; - typedef typename select1::template bind::type type; + typedef typename select1::template select::type type; }; #else template struct find_param; @@ -604,18 +604,32 @@ namespace detail { struct make_named_arg { template - struct bind { typedef typename Value::type type; }; + struct select { typedef typename Value::type type; }; }; struct make_key_value { template - struct bind { typedef detail::cons_type type; }; + struct select { typedef detail::cons_type type; }; }; + template + struct is_named_parameter + { + enum { value = is_convertible::value }; + }; + +#if defined(__MWERKS__) && __MWERKS__ <= 0x2405 // workaround for broken is_convertible implementation + template struct is_named_parameter > { enum { value = true }; }; + template struct is_named_parameter > { enum { value = true }; }; + template struct is_named_parameter > { enum { value = true }; }; + template struct is_named_parameter > { enum { value = true }; }; + template struct is_named_parameter > { enum { value = true }; }; +#endif + template struct make_arg { - enum { is_named = is_convertible::value }; + enum { is_named = is_named_parameter::value }; typedef typename ct_if::type Make; - typedef typename Make::template bind::type type; + typedef typename Make::template select::type type; }; // Mechanism for resolving the default argument for a template parameter. @@ -626,14 +640,14 @@ namespace detail { struct choose_default { template - struct bind { + struct select { typedef typename default_generator::type Gen; typedef typename Gen::template select::type type; }; }; struct choose_arg { template - struct bind { + struct select { typedef Arg type; }; }; @@ -650,7 +664,7 @@ namespace detail { Selector; public: typedef typename Selector - ::template bind::type type; + ::template select::type type; }; template = ForwardIterator must produce real references // as required by the C++ standard requirements in Table 74. BOOST_STATIC_CONSTANT(bool, forward_iter_with_real_reference = @@ -791,7 +806,6 @@ struct iterator_adaptor : || boost::is_same::value || boost::is_same::value)); -#if !defined(BOOST_MSVC) // This check gives incorrect results in iter_traits_gen_test.cpp BOOST_STATIC_ASSERT(forward_iter_with_real_reference); #endif