Mozy Online Backup: 2GB Free. Automatic. Secure.
Subject: suggested change to range_run.cpp test (was Re: integer_traits_test flawed - msg#00010
List: parsers.spirit.devel
On 06/11/2007 11:55 AM, Larry Evans wrote:
[snip]
>
Compilation segmentation fault at Mon Jun 11 11:27:28
>
>
So, the problem's with wchar_t; however, the latest regressions:
>
>
http://engineering.meta-comm.com/boost-regression/CVS-RC_1_34_0/developer/integer_release.html
>
>
indicate that integer_traits_test.cpp, which does have a test for
>
wchar_t, is passing. Maybe this integer_traits_test needs
>
changing to be more complete? I'll post this to devel list
>
to see.
The problem is that dynamic_bitset CTOR expects std::size_t arg and
the range of wchar_t is too large. This problem would be more
apparent if renge_run.cpp(around line 39) were changed as follows:
typedef boost::dynamic_bitset<> dynbitset_type;
typedef typename dynbitset_type::size_type bitset_size_type;
bitset_size_type const bitset_size_val=const_max-const_min+1;
BOOST_TEST(bitset_size_val > 0);//is biset_size_type large enough?
dynbitset_type bset(bitset_size_val);
this would result in a test run with output:
gcc.compile.c++
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/range_run.o
qi/range_run.cpp: In function 'void acid_test() [with Char = wchar_t]':
qi/range_run.cpp:168: instantiated from here
qi/range_run.cpp:41: warning: overflow in implicit constant conversion
gcc.link
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/range_run
testing.capture-output
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/range_run.run
====== BEGIN OUTPUT ======
qi/range_run.cpp(42): test 'bitset_size_val > 0' failed in function
'void acid_test() [with Char = wchar_t]'
EXIT STATUS: 139
====== END OUTPUT ======
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: [Fusion] Notice of breaking change
dan marsden wrote:
>> The definition of Fusion polymorphic function object will be changed shortly
>> to be consistent with boost.resultof. Instead of requiring a nested result
>> metafunction of the form:
>>
>> template<typename T0, typename T1, ... typename TN>
>> struct result
>> {
>> typedef xxx type;
>> };
>>
>> A polymorphic function object will instead simply be required to suppport
>>
>> boost::result_of<F(A,B,...Z)>::type
>>
>> as a valid expression.
>>
>> This will break some Fusion client code, specifically, if you are using
>> fold, accumulate, transform, or a lot of the components in the functional
>> section
>> of the library, you may need to make changes to support this change.
>>
>> The change should be entered into CVS head over the forthcoming weekend.
>
> The above change has now been applied. Docs upgrades will follow in the next
> few days.
I've made the necessary changes to Proto on HEAD. Thanks, Dan.
--
Eric Niebler
Boost Consulting
www.boost-consulting.com
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Next Message by Date:
click to view message preview
Re: [proto] grammar matching issue
Eric Niebler wrote:
> Maurizio Vitale wrote:
>> if you could find a way to completely hide the fact that a terminal is
>> a unary_expr from the user I think it would be much cleaner for
>> a boost::proto release.
>
> I now have some ideas about how to add nullary expressions to proto.
> I'll investigate.
Proto terminals are now nullary expressions. The change is that
terminal<int>::type used to be:
expr<tag::terminal, args1<int>, 1>
and now it is:
expr<tag::terminal, args0<int>, 0>
Everything else stays pretty much the same. This is a breaking change,
so watch out.
--
Eric Niebler
Boost Consulting
www.boost-consulting.com
The Astoria Seminar ==> http://www.astoriaseminar.com
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Previous Message by Thread:
click to view message preview
integer_traits_test flawed?(was Re: test/Jamfile.2 problems (was Re: comments on spirit2at svn...
On 06/11/2007 09:30 AM, Larry Evans wrote:
> On 06/08/2007 01:30 PM, Larry Evans wrote:
[snip]
> cd
> ~/prog_dev/boost-cvs/ro/boost/bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/
> ./range_run
> :const_max=
> :const_min=Â
> :const_max-const_min=255
> :const_max=
> :const_min=Â
> :const_max-const_min=255
> :const_max=Ã
> :const_min=
>
> So there's some binary output. I'll investigate further, but
> if you have any ideas, it'd probably help.
>
Converted values to long and with more prints got:
cd
/home/evansl/prog_dev/boost-cvs/ro/boost/bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/
./range_run
acid_test<char>:
:const_max=127
:const_min=4294967168
:const_max-const_min=255
:const_max-const_min+1=256
acid_test<signed char>:
:const_max=127
:const_min=4294967168
:const_max-const_min=255
:const_max-const_min+1=256
acid_test<unsigned char>:
:const_max=255
:const_min=0
:const_max-const_min=255
:const_max-const_min+1=256
acid_test<wchar_t>:
:const_max=2147483647
:const_min=2147483648
:const_max-const_min=4294967295
:const_max-const_min+1=0
Compilation segmentation fault at Mon Jun 11 11:27:28
So, the problem's with wchar_t; however, the latest regressions:
http://engineering.meta-comm.com/boost-regression/CVS-RC_1_34_0/developer/integer_release.html
indicate that integer_traits_test.cpp, which does have a test for
wchar_t, is passing. Maybe this integer_traits_test needs
changing to be more complete? I'll post this to devel list
to see.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
Spirit-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Next Message by Thread:
click to view message preview
Attn: Hartmut Kaiser
Sorry for doing this on the list, but I've been trying to reach
Hartmut for a week. Maybe someone's spam filter is misbehaving?
Hartmut, please be in touch. Aside from my email, there's:
AIM: boostdave
YAHOO: dave_abrahams
Jabber: dave_abrahams@xxxxxxxxxx
MSN: dave@xxxxxxxxxxxxxxxxxxxx
Skype: david.abrahams
--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/