Boost logo

Boost Testing :

From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2005-05-29 13:38:52


 
David Abrahams wrote:

> > does anybody of the CW tester have some time to look at this issue:
> > http://tinyurl.com/du5w8 (all CW's toolsets show a similar error)?
> > Essentially the problem boils down to:
> >
> > #define INIT_DATA_SIZE 176
> >
> > template <typename T>
> > struct A
> > {
> > typedef T base_type;
> >
> > struct data {
> > typename base_t::callback_type tokencb;
> ^^^^^^
> base_type

Sure, I've simplified the snippet by hand and forgot to correct this one.

> > // other members here
> > };
> >
> > static data const init_data[INIT_DATA_SIZE];
> > };
> >
> > template <typename T>
> > typename A<T>::data const A<T>::init_data[INIT_DATA_SIZE] =
> > {
> > // initialisation elements go here....
> > };
> >
> > The compilers claim:
> >
> > # Error: ^
> > # identifier 'A::init_data' redeclared
> > # was declared as: 'const A::lexer_data[176]'
> > # now declared as: 'const A::lexer_data[176]'
> >
> > I've added the concrete count of initialisation elements
> later on, the
> > same error occurs when the arrays are declared and defined
> as 'init_data[]'
> > instead of 'init_data[INIT_DATA_SIZE]'.
> >
> > Any ideas?
>
> Clearly a bug; I reported it to MW. This workaround may be
> painful, but it works:
>
[snip]

Thanks! I've applied the workaround to the codebase, let's see what happens.

Regards Hartmut


Boost-testing list run by mbergal at meta-comm.com