Boost logo

Boost :

Subject: Re: [boost] static in_class constants
From: Christian Henning (chhenning_at_[hidden])
Date: 2010-03-13 14:46:33


Hi,

>
> The BOOST_TEST_MAIN is required and it is only defined in test.cpp
>
> $ cat test.cpp
> #define BOOST_TEST_MAIN
> #include <boost/test/unit_test.hpp>

I see what you mean. Is it problematic to define BOOST_TEST_MAIN more
than once. I think that's reason I have it in test.cpp, only.

When building all test you can run selected tests by given certain
command line parameters. Of course, don't remember, right now, which
one. ;-)

>
> As I mentioned in my previous reply in this thread, it should not be an
> issue, because AFAIK GCC, since 3.4.x, does support [1] compilation of
> such definitions of constants.
> However, I suppose you may be suffering of address-of-constant issue [2]
> which I also confirmed in my previous reply.
>
> [1] http://gcc.gnu.org/ml/gcc-help/2005-10/msg00082.html
> [2] http://gcc.gnu.org/ml/gcc-help/2005-10/msg00083.html
>

I'm not using the address just the value.

Regards,
Christian


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