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
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 : (
- 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
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
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
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
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
- 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
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
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(
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
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
- 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 ) \
/**/
- 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
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
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,
16 matches
Mail list logo