123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- #ifndef BOOST_STRING_SEQUENCE_TRAITS_HPP
- #define BOOST_STRING_SEQUENCE_TRAITS_HPP
- #include <boost/config.hpp>
- #include <boost/mpl/bool.hpp>
- #include <boost/algorithm/string/yes_no_type.hpp>
- namespace boost {
- namespace algorithm {
- #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-
- no_type has_native_replace_tester(...);
-
-
- no_type has_stable_iterators_tester(...);
-
-
- no_type has_const_time_insert_tester(...);
-
-
- no_type has_const_time_erase_tester(...);
- #endif
-
-
- template< typename T >
- class has_native_replace
- {
- #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- private:
- static T* t;
- public:
- BOOST_STATIC_CONSTANT(bool, value=(
- sizeof(has_native_replace_tester(t))==sizeof(yes_type) ) );
- #else
- public:
- # if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
- enum { value = false };
- # else
- BOOST_STATIC_CONSTANT(bool, value=false);
- # endif
- #endif
- typedef mpl::bool_<has_native_replace<T>::value> type;
- };
-
-
- template< typename T >
- class has_stable_iterators
- {
- #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- private:
- static T* t;
- public:
- BOOST_STATIC_CONSTANT(bool, value=(
- sizeof(has_stable_iterators_tester(t))==sizeof(yes_type) ) );
- #else
- public:
- # if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
- enum { value = false };
- # else
- BOOST_STATIC_CONSTANT(bool, value=false);
- # endif
- #endif
- typedef mpl::bool_<has_stable_iterators<T>::value> type;
- };
-
-
- template< typename T >
- class has_const_time_insert
- {
- #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- private:
- static T* t;
- public:
- BOOST_STATIC_CONSTANT(bool, value=(
- sizeof(has_const_time_insert_tester(t))==sizeof(yes_type) ) );
- #else
- public:
- # if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
- enum { value = false };
- # else
- BOOST_STATIC_CONSTANT(bool, value=false);
- # endif
- #endif
- typedef mpl::bool_<has_const_time_insert<T>::value> type;
- };
-
-
- template< typename T >
- class has_const_time_erase
- {
- #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- private:
- static T* t;
- public:
- BOOST_STATIC_CONSTANT(bool, value=(
- sizeof(has_const_time_erase_tester(t))==sizeof(yes_type) ) );
- #else
- public:
- # if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
- enum { value = false };
- # else
- BOOST_STATIC_CONSTANT(bool, value=false);
- # endif
- #endif
- typedef mpl::bool_<has_const_time_erase<T>::value> type;
- };
- }
- }
- #endif
|