1 // Boost string_algo library slist_traits.hpp header file ---------------------------// 2 3 // Copyright Pavol Droba 2002-2003. 4 // 5 // Distributed under the Boost Software License, Version 1.0. 6 // (See accompanying file LICENSE_1_0.txt or copy at 7 // http://www.boost.org/LICENSE_1_0.txt) 8 9 // See http://www.boost.org/ for updates, documentation, and revision history. 10 11 #ifndef BOOST_STRING_STD_SLIST_TRAITS_HPP 12 #define BOOST_STRING_STD_SLIST_TRAITS_HPP 13 14 #include <boost/algorithm/string/config.hpp> 15 #include <boost/algorithm/string/yes_no_type.hpp> 16 #include BOOST_SLIST_HEADER 17 #include <boost/algorithm/string/sequence_traits.hpp> 18 19 namespace boost { 20 namespace algorithm { 21 22 // SGI's std::slist<> traits -----------------------------------------------// 23 24 25 // stable iterators trait 26 template<typename T, typename AllocT> 27 class has_stable_iterators< BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT> > 28 { 29 public: 30 #if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) 31 enum { value = true }; 32 #else 33 BOOST_STATIC_CONSTANT(bool, value=true); 34 #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) 35 typedef mpl::bool_<has_stable_iterators<T>::value> type; 36 }; 37 38 // const time insert trait 39 template<typename T, typename AllocT> 40 class has_const_time_insert< BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT> > 41 { 42 public: 43 #if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) 44 enum { value = true }; 45 #else 46 BOOST_STATIC_CONSTANT(bool, value=true); 47 #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) 48 typedef mpl::bool_<has_const_time_insert<T>::value> type; 49 }; 50 51 // const time erase trait 52 template<typename T, typename AllocT> 53 class has_const_time_erase< BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT> > 54 { 55 public: 56 #if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) 57 enum { value = true }; 58 #else 59 BOOST_STATIC_CONSTANT(bool, value=true); 60 #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) 61 typedef mpl::bool_<has_const_time_erase<T>::value> type; 62 }; 63 64 65 } // namespace algorithm 66 } // namespace boost 67 68 69 #endif // BOOST_STRING_STD_LIST_TRAITS_HPP 70