Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2006-01-30 20:16:53


Dick Bridges wrote:
> /usr/local/boost_1_33_1/boost/xpressive/traits/cpp_regex_traits.hpp:241:
> warning: comparison is always false due to limited range of data
> type
> /usr/local/boost_1_33_1/boost/xpressive/traits/cpp_regex_traits.hpp:241:
> warning: comparison is always false due to limited range of data type

<snip>

>
> Here is the "offending" code:
>
> static bool is_newline(Char ch)
> {
> BOOST_MPL_ASSERT_RELATION('\r', ==, L'\r');
> BOOST_MPL_ASSERT_RELATION('\n', ==, L'\n');
> BOOST_MPL_ASSERT_RELATION('\f', ==, L'\f');
> 241 ==> return L'\r' == ch || L'\n' == ch || L'\f' == ch
> || (1 < SizeOfChar && (0x2028u == ch || 0x2029u == ch ||
> 0x85u == ch));
> }

This warning is harmless. It's because I was lazy and only wanted to
write one function instead of splitting it into one for narrow chars and
one for wide. I'll put it on my ToDo list.

Thanks,

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk