Boost logo

Boost :

From: fcacciola_at_[hidden]
Date: 2001-12-31 12:36:13


----- Original Message -----
From: "joel de guzman" <djowel_at_[hidden]>
To: "Fernando Cacciola" <fcacciola_at_[hidden]>
Cc: "Spirit" <spirit-general_at_[hidden]>
Sent: Thursday, December 27, 2001 7:59 PM
Subject: Re: [boost] boost::tuples and internal compiler error F1004

>
> ----- Original Message -----
> From: "Fernando Cacciola"
>
> > So, if 'extern' is added before ignore, the namespace namespace isn't
> needed
> > and can be removed, which makes
> > BCB happy.
> >
> > (I know this forces the user to put 'ignore' on some .cpp , but that's a
> low
> > price to pay for being able to use tuples with
> > precompiled headers)
> >
>
> namespace {
>
> extern detail::swallow_assign ignore;
>
> }
>
> Unfortunately this workaround is not acceptable for Spirit,
> being a header only library ;-(
>
> --Joel
>
I see.
How about:

inline detail::swallow_assign ignore() { return detail::swallow_assign ; }

I know this changes the syntaxis, but it doesn't introduce initialized data
in the header, so it allows the header to be precompiled.
I noticed this before, but it appears that noone cares to precompile tuples
(or other compilers allow initialize data in precompiled headers)

Fernando Cacciola


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