[boost] Re: Boost unit test suggestion - checkpoints for exceptions

2003-01-01 Thread Gennadiy Rozental
There's one thing I'm wondering about. If you get an exception in a test, it won't show which line caused the exception, only that one has happened somewhere. In a unit test with 100+ tests, it can be hard to find which one caused the exception, so I started to litter the test code with

[boost] BOOST_PP_RANGE?

2003-01-01 Thread Aleksey Gurtovoy
I am going to use our wonderful Preprocessor library to generate a metafunction that basically looks like this: template int C0, int C1, ..., int Cn struct max_arity { static int const value = Cn 0 ? Cn : ( Cn-1 0 ? Cn-1 : ... ( C1 0 ? C1 : (

Re: [boost] BOOST_PP_RANGE?

2003-01-01 Thread Paul Mensonides
- Original Message - From: Aleksey Gurtovoy [EMAIL PROTECTED] Hi Aleksey, I am going to use our wonderful Preprocessor library to generate a metafunction that basically looks like this: [...] I love everything about it except for the (0, (1, (2, (3, (4, BOOST_PP_NIL) part. I

Re: [boost] is the link-fail test working correctly in the regressiontests?

2003-01-01 Thread John Maddock
I intentionally changed it because it seemed as though a test which was supposed to fail to link, but which fails to compile should not be deemed a success. I think I did this by analogy with run-fail, where we were masking some actual compile-time failures which should not have been

Re: [boost] is the link-fail test working correctly in theregression tests?

2003-01-01 Thread David Abrahams
John Maddock [EMAIL PROTECTED] writes: I intentionally changed it because it seemed as though a test which was supposed to fail to link, but which fails to compile should not be deemed a success. I think I did this by analogy with run-fail, where we were masking some actual compile-time

Re: [boost] Boost unit test suggestion - checkpoints for exceptions

2003-01-01 Thread Terje Slettebø
From: Paul Mensonides [EMAIL PROTECTED] From: Terje Slettebø [EMAIL PROTECTED] To do that (without changing the Boost unit test code), I made a few forwarding macros, like this: #define BOOST_CHECK_EQUAL_CP(a,b)\ BOOST_CHECKPOINT(BOOST_CHECK_EQUAL(##BOOST_STRINGIZE(a)##,##BOOST_STRING

Re: [boost] Re: Boost unit test suggestion - checkpoints forexceptions

2003-01-01 Thread Terje Sletteb
There's one thing I'm wondering about. If you get an exception in a test, it won't show which line caused the exception, only that one has happened somewhere. In a unit test with 100+ tests, it can be hard to find which one caused the exception, so I started to litter the test code with

Re: [boost] Re: Re: Using MPL on MSVC7

2003-01-01 Thread Paul Mensonides
- Original Message - From: David Abrahams [EMAIL PROTECTED] Paul Mensonides [EMAIL PROTECTED] writes: - Original Message - From: David Abrahams [EMAIL PROTECTED] Yeah. I have no problem with access protection where it prevents unintentional misuse and improves

[boost] BOOST_STATIC_CONSTANT problems on Borland

2003-01-01 Thread Jaap Suter
Hi, Compiling the following code on Borland 5.6: _ template size_t N struct widget {}; template class T struct foo { BOOST_STATIC_CONSTANT( size_t, static_constant = 42 ); typedef widget static_constant bar_1; size_t bar_2() { return

RE: [boost] BOOST_PP_RANGE?

2003-01-01 Thread Aleksey Gurtovoy
Paul Mensonides wrote: #include boost/preprocessor/seq/fold_left.hpp #include boost/preprocessor/seq/subseq.hpp #define NUMBERS \ (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \ (10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \ /* ... */ #define RANGE(first, length) \ BOOST_PP_SEQ_SUBSEQ(

[boost] Re: What is DocBook?

2003-01-01 Thread John Nagle
Ihsan Ali Al Darhi wrote: Hi... Today I again read about the use of DocBook for Boost library documentation. To tell you the truth, I didn't understand what this DocBook is. It's a scheme for standardizing documentation. It's one of those obscure and complicated SGML/XML things that

[boost] Re: Re: Using MPL on MSVC7

2003-01-01 Thread Jaap Suter
Perhaps it is a good idea to add those missing operators to the MPL? It is! They are not there only because you are the pioneer, here. The followers will be very grateful :) See other message. It's not that frightening, but I understand :). I'll try to do something about documenting the

Re: [boost] BOOST_PP_RANGE?

2003-01-01 Thread Paul Mensonides
- Original Message - From: Aleksey Gurtovoy [EMAIL PROTECTED] #define NUMBERS \ (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \ (10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \ /* ... */ #define RANGE(first, length) \ BOOST_PP_SEQ_SUBSEQ( NUMBERS, first, length ) \ /**/

Re: [boost] BOOST_PP_RANGE?

2003-01-01 Thread Paul Mensonides
- Original Message - From: Aleksey Gurtovoy [EMAIL PROTECTED] BOOST_PP_SEQ_FOLD_LEFT(AUX_MAX_ARITY_OP, -1, RANGE(0, 5)) Hmm, it doesn't work on Metrowerks 8.3: the compiler chokes on preprocessing [...] Is it a known failure? It would be nice to have some tests for the SEQ stuff

[boost] Re: Re: Re: Using MPL on MSVC7

2003-01-01 Thread Jaap Suter
First thing to note is that you leave out typename all over the place. Try testing your examples with GCC-3.2. Yeah, I noticed. I had the same problem when porting my own code from Intel to GCC. Strange that the strongly-conforming Intel compiler doesn't issue a warning for it. Fixed in the

RE: [boost] BOOST_PP_RANGE?

2003-01-01 Thread Aleksey Gurtovoy
Paul Mensonides wrote: - Original Message - From: Aleksey Gurtovoy [EMAIL PROTECTED] #define NUMBERS \ (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \ (10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \ /* ... */ #define RANGE(first, length) \ BOOST_PP_SEQ_SUBSEQ( NUMBERS,