diff --git a/CMakeLists.txt b/CMakeLists.txt index 299ef84e9c..83aa2f5d33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,6 @@ target_link_libraries(${_boost_python} Boost::conversion Boost::core Boost::detail - Boost::foreach Boost::function Boost::iterator Boost::lexical_cast diff --git a/build.jam b/build.jam index e9eb1a11a2..a3e06c1fca 100644 --- a/build.jam +++ b/build.jam @@ -12,7 +12,6 @@ constant boost_dependencies : /boost/conversion//boost_conversion /boost/core//boost_core /boost/detail//boost_detail - /boost/foreach//boost_foreach /boost/function//boost_function /boost/iterator//boost_iterator /boost/lexical_cast//boost_lexical_cast diff --git a/include/boost/python/suite/indexing/container_utils.hpp b/include/boost/python/suite/indexing/container_utils.hpp index 72710bb8b0..03302820fd 100644 --- a/include/boost/python/suite/indexing/container_utils.hpp +++ b/include/boost/python/suite/indexing/container_utils.hpp @@ -8,26 +8,21 @@ # define PY_CONTAINER_UTILS_JDG20038_HPP # include -# include # include # include # include # include namespace boost { namespace python { namespace container_utils { - + template void extend_container(Container& container, object l) { typedef typename Container::value_type data_type; - + // l must be iterable - BOOST_FOREACH(object elem, - std::make_pair( - boost::python::stl_input_iterator(l), - boost::python::stl_input_iterator() - )) + for (object elem: l) { extract x(elem); // try if elem is an exact data_type type @@ -49,7 +44,7 @@ namespace boost { namespace python { namespace container_utils { throw_error_already_set(); } } - } + } } }}} // namespace boost::python::container_utils