1 //  Boost string_algo library string_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_ROPE_TRAITS_HPP
12 #define BOOST_STRING_STD_ROPE_TRAITS_HPP
13 
14 #include <boost/algorithm/string/yes_no_type.hpp>
15 #include <rope>
16 #include <boost/algorithm/string/sequence_traits.hpp>
17 
18 namespace boost {
19     namespace algorithm {
20 
21 //  SGI's std::rope<> traits  -----------------------------------------------//
22 
23 
24     // native replace trait
25         template<typename T, typename TraitsT, typename AllocT>
26         class has_native_replace< std::rope<T,TraitsT,AllocT> >
27         {
28         public:
29 #if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
30             enum { value = true };
31 #else
32             BOOST_STATIC_CONSTANT(bool, value=true);
33 #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
34             typedef mpl::bool_<value> type;
35         };
36 
37     // stable iterators trait
38         template<typename T, typename TraitsT, typename AllocT>
39         class has_stable_iterators< std::rope<T,TraitsT,AllocT> >
40         {
41         public:
42 #if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
43             enum { value = true };
44 #else
45             BOOST_STATIC_CONSTANT(bool, value=true);
46 #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
47             typedef mpl::bool_<value> type;
48         };
49 
50     // const time insert trait
51         template<typename T, typename TraitsT, typename AllocT>
52         class has_const_time_insert< std::rope<T,TraitsT,AllocT> >
53         {
54         public:
55 #if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
56             enum { value = true };
57 #else
58             BOOST_STATIC_CONSTANT(bool, value=true);
59 #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
60             typedef mpl::bool_<value> type;
61         };
62 
63     // const time erase trait
64         template<typename T, typename TraitsT, typename AllocT>
65         class has_const_time_erase< std::rope<T,TraitsT,AllocT> >
66         {
67         public:
68 #if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
69             enum { value = true };
70 #else
71             BOOST_STATIC_CONSTANT(bool, value=true);
72 #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
73             typedef mpl::bool_<value> type;
74         };
75 
76 
77     } // namespace algorithm
78 } // namespace boost
79 
80 
81 #endif  // BOOST_STRING_ROPE_TRAITS_HPP
82