1 | // Boost string_algo library slist_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_SLIST_TRAITS_HPP
|
---|
11 | #define BOOST_STRING_STD_SLIST_TRAITS_HPP
|
---|
12 |
|
---|
13 | #include <boost/algorithm/string/config.hpp>
|
---|
14 | #include <boost/algorithm/string/yes_no_type.hpp>
|
---|
15 | #include <slist>
|
---|
16 | #include <boost/algorithm/string/sequence_traits.hpp>
|
---|
17 |
|
---|
18 | namespace boost {
|
---|
19 | namespace algorithm {
|
---|
20 |
|
---|
21 | // SGI's std::slist<> traits -----------------------------------------------//
|
---|
22 |
|
---|
23 | #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
---|
24 |
|
---|
25 | // stable iterators tester
|
---|
26 | template<typename T, typename AllocT>
|
---|
27 | yes_type has_stable_iterators_tester( const BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT>* );
|
---|
28 |
|
---|
29 | // const time insert tester
|
---|
30 | template<typename T, typename AllocT>
|
---|
31 | yes_type has_const_time_insert_tester( const BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT>* );
|
---|
32 |
|
---|
33 | // const time erase tester
|
---|
34 | template<typename T, typename AllocT>
|
---|
35 | yes_type has_const_time_erase_tester( const BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT>* );
|
---|
36 |
|
---|
37 | #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
---|
38 |
|
---|
39 | // stable iterators trait
|
---|
40 | template<typename T, typename AllocT>
|
---|
41 | class has_stable_iterators< BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT> >
|
---|
42 | {
|
---|
43 | public:
|
---|
44 | #if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
|
---|
45 | enum { value = true };
|
---|
46 | #else
|
---|
47 | BOOST_STATIC_CONSTANT(bool, value=true);
|
---|
48 | #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
|
---|
49 | typedef mpl::bool_<has_stable_iterators<T>::value> type;
|
---|
50 | };
|
---|
51 |
|
---|
52 | // const time insert trait
|
---|
53 | template<typename T, typename AllocT>
|
---|
54 | class has_const_time_insert< BOOST_STD_EXTENSION_NAMESPACE::slist<T,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_<has_const_time_insert<T>::value> type;
|
---|
63 | };
|
---|
64 |
|
---|
65 | // const time erase trait
|
---|
66 | template<typename T, typename AllocT>
|
---|
67 | class has_const_time_erase< BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT> >
|
---|
68 | {
|
---|
69 | public:
|
---|
70 | #if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
|
---|
71 | enum { value = true };
|
---|
72 | #else
|
---|
73 | BOOST_STATIC_CONSTANT(bool, value=true);
|
---|
74 | #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
|
---|
75 | typedef mpl::bool_<has_const_time_erase<T>::value> type;
|
---|
76 | };
|
---|
77 | #endif
|
---|
78 |
|
---|
79 |
|
---|
80 | } // namespace algorithm
|
---|
81 | } // namespace boost
|
---|
82 |
|
---|
83 |
|
---|
84 | #endif // BOOST_STRING_STD_LIST_TRAITS_HPP
|
---|