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