Changeset 44628


Ignore:
Timestamp:
Apr 20, 2008, 1:37:42 PM (10 years ago)
Author:
Hartmut Kaiser
Message:

Spirit.Lex: Yet another wchar_t fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/spirit/home/support/detail/lexer/consts.hpp

    r44627 r44628  
    88
    99#include <boost/config.hpp>
    10 #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun))
    11 #include <wchar.h>
    12 #endif
     10#include <boost/integer_traits.hpp>
    1311#include <boost/spirit/home/support/detail/lexer/size_t.hpp>
    1412
     
    2422    const std::size_t max_macro_len = 20;
    2523    const std::size_t num_chars = 256;
    26 #if defined(WCHAR_MAX)
    27     const std::size_t num_wchar_ts = WCHAR_MAX < 0x110000 ? WCHAR_MAX : 0x110000;
    28 #else
    29     const std::size_t num_wchar_ts = 0x110000;
    30 #endif
     24    const std::size_t num_wchar_ts =
     25        (boost::integer_traits<wchar_t>::const_max < 0x110000) ?
     26            boost::integer_traits<wchar_t>::const_max : 0x110000;
    3127    const std::size_t null_token = static_cast<std::size_t> (~0);
    3228    const std::size_t bol_token = static_cast<std::size_t> (~1);
Note: See TracChangeset for help on using the changeset viewer.