1 ///////////////////////////////////////////////////////////////////////////////
4 // Copyright 2008 Eric Niebler. Distributed under the Boost
5 // Software License, Version 1.0. (See accompanying file
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 #ifndef BOOST_XPRESSIVE_DETAIL_STATIC_TYPE_TRAITS_HPP_EAN_10_04_2005
9 #define BOOST_XPRESSIVE_DETAIL_STATIC_TYPE_TRAITS_HPP_EAN_10_04_2005
11 // MS compatible compilers support #pragma once
17 #include <boost/config.hpp>
18 #include <boost/mpl/bool.hpp>
19 #include <boost/iterator/iterator_traits.hpp>
20 #include <boost/type_traits/is_convertible.hpp>
21 #include <boost/xpressive/detail/detail_fwd.hpp>
23 namespace boost { namespace xpressive { namespace detail
26 ///////////////////////////////////////////////////////////////////////////////
27 // is_static_xpression
30 struct is_static_xpression
35 template<typename Matcher, typename Next>
36 struct is_static_xpression<static_xpression<Matcher, Next> >
41 template<typename Top, typename Next>
42 struct is_static_xpression<stacked_xpression<Top, Next> >
47 //////////////////////////////////////////////////////////////////////////
50 template<typename BidiIter>
54 typename iterator_category<BidiIter>::type
55 , std::random_access_iterator_tag
60 //////////////////////////////////////////////////////////////////////////
63 template<typename Iter>
64 struct is_string_iterator
70 struct is_string_iterator<std::string::iterator>
76 struct is_string_iterator<std::string::const_iterator>
81 #ifndef BOOST_NO_STD_WSTRING
83 struct is_string_iterator<std::wstring::iterator>
89 struct is_string_iterator<std::wstring::const_iterator>
95 ///////////////////////////////////////////////////////////////////////////////
109 struct is_char<wchar_t>
113 }}} // namespace boost::xpressive::detail