2 // Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/)
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef BOOST_LEXER_CHAR_TRAITS_H
7 #define BOOST_LEXER_CHAR_TRAITS_H
9 // Make sure wchar_t is defined
16 template<typename CharT>
19 typedef CharT char_type;
20 typedef CharT index_type;
22 static index_type call (CharT ch)
29 struct char_traits<char>
31 typedef char char_type;
32 typedef unsigned char index_type;
34 static index_type call (char ch)
36 return static_cast<index_type>(ch);
41 struct char_traits<wchar_t>
43 typedef wchar_t char_type;
44 typedef wchar_t index_type;
46 static index_type call (wchar_t ch)