1 | // Boost string_algo library string_traits.hpp header file ---------------------------//
|
---|
2 |
|
---|
3 | // Copyright Pavol Droba 2002-2003. Use, modification and
|
---|
4 | // distribution is subject to the Boost Software License, Version
|
---|
5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
---|
6 | // http://www.boost.org/LICENSE_1_0.txt)
|
---|
7 |
|
---|
8 | // See http://www.boost.org for updates, documentation, and revision history.
|
---|
9 |
|
---|
10 | #ifndef BOOST_STRING_STD_STRING_TRAITS_HPP
|
---|
11 | #define BOOST_STRING_STD_STRING_TRAITS_HPP
|
---|
12 |
|
---|
13 | #include <boost/algorithm/string/yes_no_type.hpp>
|
---|
14 | #include <string>
|
---|
15 | #include <boost/algorithm/string/sequence_traits.hpp>
|
---|
16 |
|
---|
17 | namespace boost {
|
---|
18 | namespace algorithm {
|
---|
19 |
|
---|
20 | // std::basic_string<> traits -----------------------------------------------//
|
---|
21 |
|
---|
22 | #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
---|
23 |
|
---|
24 | // native replace tester
|
---|
25 | template<typename T, typename TraitsT, typename AllocT>
|
---|
26 | yes_type has_native_replace_tester( const std::basic_string<T, TraitsT, AllocT>* );
|
---|
27 |
|
---|
28 | #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
---|
29 |
|
---|
30 | // native replace trait
|
---|
31 | template<typename T, typename TraitsT, typename AllocT>
|
---|
32 | class has_native_replace< std::basic_string<T, TraitsT, AllocT> >
|
---|
33 | {
|
---|
34 | public:
|
---|
35 | #if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
|
---|
36 | enum { value = true } ;
|
---|
37 | #else
|
---|
38 | BOOST_STATIC_CONSTANT(bool, value=true);
|
---|
39 | #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
|
---|
40 |
|
---|
41 | typedef mpl::bool_<has_native_replace<T>::value> type;
|
---|
42 | };
|
---|
43 |
|
---|
44 |
|
---|
45 | #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
---|
46 |
|
---|
47 | } // namespace algorithm
|
---|
48 | } // namespace boost
|
---|
49 |
|
---|
50 |
|
---|
51 | #endif // BOOST_STRING_LIST_TRAITS_HPP
|
---|