From ec103b76cde8ba57c224204fee96925a75c121a3 Mon Sep 17 00:00:00 2001 From: Raoul Gough Date: Thu, 11 Sep 2003 22:38:39 +0000 Subject: [PATCH] Remove algorithms typedefs (which were kind of circular in nature) [SVN r1537] --- .../suite/indexing/container_traits.hpp | 143 ------------------ 1 file changed, 143 deletions(-) diff --git a/include/boost/python/suite/indexing/container_traits.hpp b/include/boost/python/suite/indexing/container_traits.hpp index 04b4abff..5c121d96 100755 --- a/include/boost/python/suite/indexing/container_traits.hpp +++ b/include/boost/python/suite/indexing/container_traits.hpp @@ -29,13 +29,6 @@ #include "iterator_suite.hpp" #include -#include "iterator_pair.hpp" -#include -#include -#include -#include -#include - namespace indexing { ///////////////////////////////////////////////////////////////////////// // Traits for the iterator_pair container emulator @@ -54,9 +47,6 @@ namespace indexing { static bool const has_erase = false; static bool const has_pop_back = false; static bool const has_push_back = false; - - // Default implementations of support functions - typedef container_algorithms algorithms; }; ///////////////////////////////////////////////////////////////////////// @@ -105,9 +95,6 @@ namespace indexing { static bool const has_erase = is_mutable; static bool const has_pop_back = false; static bool const has_push_back = false; - - // Default implementations of support functions - typedef container_algorithms algorithms; }; ///////////////////////////////////////////////////////////////////////// @@ -121,13 +108,6 @@ namespace indexing { static bool const has_push_back = is_mutable; }; - template - struct list_traits : public default_sequence_traits - { - // Some special algo's for list (using member functions) - typedef list_algorithms algorithms; - }; - ///////////////////////////////////////////////////////////////////////// // Associative containers set and multiset ///////////////////////////////////////////////////////////////////////// @@ -136,9 +116,6 @@ namespace indexing { struct set_traits : public default_container_traits { static IndexStyle const index_style = index_style_nonlinear; - - // Special algo's for set types (using member functions) - typedef assoc_algorithms algorithms; }; ///////////////////////////////////////////////////////////////////////// @@ -155,126 +132,6 @@ namespace indexing { typedef typename Container::key_type key_type; // find, count, ... static IndexStyle const index_style = index_style_nonlinear; - - // Special algo's for map types (using member functions) - typedef assoc_algorithms algorithms; - }; - - ///////////////////////////////////////////////////////////////////////// - // Automated trait selection - ///////////////////////////////////////////////////////////////////////// - - namespace container_details { - template struct traits_by_type; - - // traits_by_type instances should include two typedefs, one for - // the non-const version of the container, and one for the - // const version. This saves having to have two specializations - // of traits_by_type for every kind of container. - - // std::set - template - class traits_by_type > - { - typedef std::set Container; - - public: - typedef set_traits mutable_type; - typedef set_traits const_type; - }; - - // std::multiset - template - class traits_by_type > - { - typedef std::multiset Container; - - public: - typedef set_traits mutable_type; - typedef set_traits const_type; - }; - - // std::map - template - class traits_by_type > - { - typedef std::map Container; - - public: - typedef map_traits mutable_type; - typedef map_traits const_type; - }; - - // std::multimap - template - class traits_by_type > - { - typedef std::multimap Container; - - public: - typedef map_traits mutable_type; - typedef map_traits const_type; - }; - - // std::vector - template - class traits_by_type > - { - typedef std::vector Container; - - public: - typedef default_sequence_traits mutable_type; - typedef default_sequence_traits const_type; - }; - - // std::deque - template - class traits_by_type > - { - typedef std::deque Container; - - public: - typedef default_sequence_traits mutable_type; - typedef default_sequence_traits const_type; - }; - - // std::list - template - class traits_by_type > - { - typedef std::list Container; - - public: - typedef list_traits mutable_type; - typedef list_traits const_type; - }; - - // Iterator ranges - template - class traits_by_type > - { - typedef ::indexing::iterator_pair Container; - - public: - typedef iterator_pair_traits mutable_type; - typedef iterator_pair_traits const_type; // ? - }; - } - - // Select the right traits for each supported kind of container - - // Generic version (mutable containers) - template - struct container_traits - : public container_details::traits_by_type::mutable_type - { - }; - - // Partial specialization for const containers - template - struct container_traits - : public container_details::traits_by_type::const_type - { }; }