summaryrefslogtreecommitdiff
path: root/boost/xpressive/detail/static/type_traits.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/xpressive/detail/static/type_traits.hpp')
-rw-r--r--boost/xpressive/detail/static/type_traits.hpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/boost/xpressive/detail/static/type_traits.hpp b/boost/xpressive/detail/static/type_traits.hpp
index 67ba77e328..15f00a4243 100644
--- a/boost/xpressive/detail/static/type_traits.hpp
+++ b/boost/xpressive/detail/static/type_traits.hpp
@@ -13,6 +13,8 @@
# pragma once
#endif
+#include <string>
+#include <boost/config.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/type_traits/is_convertible.hpp>
@@ -55,6 +57,59 @@ struct is_random
{
};
+//////////////////////////////////////////////////////////////////////////
+// is_string_iterator
+//
+template<typename Iter>
+struct is_string_iterator
+ : mpl::false_
+{
+};
+
+template<>
+struct is_string_iterator<std::string::iterator>
+ : mpl::true_
+{
+};
+
+template<>
+struct is_string_iterator<std::string::const_iterator>
+ : mpl::true_
+{
+};
+
+#ifndef BOOST_NO_STD_WSTRING
+template<>
+struct is_string_iterator<std::wstring::iterator>
+ : mpl::true_
+{
+};
+
+template<>
+struct is_string_iterator<std::wstring::const_iterator>
+ : mpl::true_
+{
+};
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// is_char
+//
+template<typename T>
+struct is_char
+ : mpl::false_
+{};
+
+template<>
+struct is_char<char>
+ : mpl::true_
+{};
+
+template<>
+struct is_char<wchar_t>
+ : mpl::true_
+{};
+
}}} // namespace boost::xpressive::detail
#endif