diff --git a/include/boost/iterator/iterator_facade.hpp b/include/boost/iterator/iterator_facade.hpp index 86249b9..36dbcaa 100644 --- a/include/boost/iterator/iterator_facade.hpp +++ b/include/boost/iterator/iterator_facade.hpp @@ -74,12 +74,6 @@ namespace boost // Generates the corresponding std::iterator specialization // from the given iterator traits type // - // The use_default support is needed for iterator_adaptor. - // For practical reasons iterator_adaptor needs to specify - // fixed number of template arguments of iterator_facade. - // So use_default is its way to say what I really mean - // is youre default parameter. - // template struct iterator_facade_base { @@ -92,7 +86,16 @@ namespace boost , typename const_qualified::type* - , Reference + // The use_default support is needed for iterator_adaptor. + // For practical reasons iterator_adaptor needs to specify + // a fixed number of template arguments of iterator_facade. + // So use_default is its way to say: "What I really mean + // is your default parameter". + , typename mpl::if_< + is_same + , typename const_qualified::type& + , Reference + >::type > type; };