rope_traits.hpp 2.5 KB

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