diff --git a/include/boost/python/suite/indexing/visitor.hpp b/include/boost/python/suite/indexing/visitor.hpp index bc901a9c..29e2cf38 100755 --- a/include/boost/python/suite/indexing/visitor.hpp +++ b/include/boost/python/suite/indexing/visitor.hpp @@ -507,9 +507,9 @@ namespace boost { namespace python { namespace indexing { maybe_add_delitem ::apply (pyClass, algorithms(), m_policy); - maybe_add_iter - <(traits::index_style != index_style_linear) - && traits::has_copyable_iter> + bool const iter_condition = (traits::index_style != index_style_linear) + && traits::has_copyable_iter; + maybe_add_iter ::apply (pyClass, algorithms(), m_policy); maybe_add_sort @@ -525,12 +525,14 @@ namespace boost { namespace python { namespace indexing { maybe_add_insert ::apply (pyClass, algorithms(), precallPolicy); - maybe_add_extend - + bool const extend_condition = (traits::index_style == index_style_linear) + && traits::has_insert; + maybe_add_extend ::apply (pyClass, algorithms(), precallPolicy); - maybe_add_index - + bool const index_condition = (traits::index_style == index_style_linear) + && traits::has_find; + maybe_add_index ::apply (pyClass, algorithms(), precallPolicy); maybe_add_count