From e2c58fcb7c88ffc745e47372d1dc794c7b6a8d74 Mon Sep 17 00:00:00 2001 From: Raoul Gough Date: Fri, 24 Oct 2003 18:48:49 +0000 Subject: [PATCH] Use type_traits::ice_and instead of named bool constants (fix for EDG 245) [SVN r20485] --- .../boost/python/suite/indexing/visitor.hpp | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/include/boost/python/suite/indexing/visitor.hpp b/include/boost/python/suite/indexing/visitor.hpp index 29e2cf38..79a161f6 100755 --- a/include/boost/python/suite/indexing/visitor.hpp +++ b/include/boost/python/suite/indexing/visitor.hpp @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -507,14 +508,16 @@ namespace boost { namespace python { namespace indexing { maybe_add_delitem ::apply (pyClass, algorithms(), m_policy); - bool const iter_condition = (traits::index_style != index_style_linear) - && traits::has_copyable_iter; - maybe_add_iter - ::apply (pyClass, algorithms(), m_policy); + maybe_add_iter< + type_traits::ice_and < + traits::index_style != index_style_linear + , traits::has_copyable_iter + >::value + >::apply (pyClass, algorithms(), m_policy); - maybe_add_sort - - ::apply (pyClass, algorithms(), precallPolicy); + maybe_add_sort < + traits::is_reorderable, value_traits_::lessthan_comparable + >::apply (pyClass, algorithms(), precallPolicy); maybe_add_reverse ::apply (pyClass, algorithms(), precallPolicy); @@ -525,15 +528,19 @@ namespace boost { namespace python { namespace indexing { maybe_add_insert ::apply (pyClass, algorithms(), precallPolicy); - bool const extend_condition = (traits::index_style == index_style_linear) - && traits::has_insert; - maybe_add_extend - ::apply (pyClass, algorithms(), precallPolicy); + maybe_add_extend < + type_traits::ice_and < + traits::index_style == index_style_linear + , traits::has_insert + >::value + >::apply (pyClass, algorithms(), precallPolicy); - bool const index_condition = (traits::index_style == index_style_linear) - && traits::has_find; - maybe_add_index - ::apply (pyClass, algorithms(), precallPolicy); + maybe_add_index < + type_traits::ice_and < + traits::index_style == index_style_linear + , traits::has_find + >::value + >::apply (pyClass, algorithms(), precallPolicy); maybe_add_count ::apply (pyClass, algorithms(), precallPolicy);