# Boost :

From: fernando_cacciola_at_[hidden]
Date: 2002-10-17 10:24:54

Hi,

I've raised this issue a couple of times before but still no solution has
been committed.
Since I just grabbed 1.29.0 and had to manually apply the following
patch -as I had done before each time a new release appears-, I'll try one
more time to manage Jaakko to finally fix it :-)

The problem is that "tuple_basic.hpp" (and
"tuple_basic_no_partial_spec.hpp") defines 'ignore' in an unnamed namespace.
Unfortunately, Borland 5.5.1 (at least) ICEs if a nested unnamed namespace
is put in a precompiled header. The result is that tuples cannot be
precompiled with bcc5.5.1.

>From the alternatives that have been discussed here before, using an
external declaration seemed to be the most acceptable and it is the one I've

To that effect, I've separated the 'ignore' definition into a different
And patched the other two headers so as to use this definition instead of
the embedded one.
The relevant part of the new header looks like this:

-------------------------------------
#ifdef BOOST_TUPLE_EXTERN
# ifndef BOOST_TUPLE_EXTERN_DEFINITION
# else
# endif
# define BOOST_TUPLE_DECLSPEC BOOST_DECL
#else
# define BOOST_TUPLE_DECLSPEC
#endif

#ifndef BOOST_TUPLE_EXTERN
namespace {
#endif

#ifndef BOOST_TUPLE_EXTERN
} // unnamed namespace
#endif

#undef BOOST_TUPLE_DECLSPEC
----------------------------------------

As you can see, this simple patch will have absolutely no effect on users
code since without BOOST_TUPLE_EXTERN the definition goes exactly as it is
now. However, for Borland users like myself, one can define
BOOST_TUPLE_EXTERN to turn on the controlled definition of 'ignore' by means
of BOOST_TUPLE_EXTERN_DEFINITION (which should be defined for only one
translation unit, possibly inside only one shared library).

Jaakko: could you please apply this patch -or anything else- so the next
time I checkout boost I don't have to apply it manually myself? I can sent
you privately the actual "tuple_ignore.hpp".

TIA,

Fernando Cacciola