Boost logo

Boost :

From: Jaakko Jarvi (jajarvi_at_[hidden])
Date: 2002-10-17 21:52:04

On Thu, 17 Oct 2002 fernando_cacciola_at_[hidden] wrote:

> 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 :-)

Ok, ok... :)

Sorry for ignoring ignore earlier.

Did this fix come up in earlier discussions:

1. define ignore as some function that has some special type

namespace detail {

  class ignore_helper {};
  typedef void (ignore_type) (ignore_helper);

void ignore(detail::ignore_helper) {}

2. Make tie functions recognize this and create a tuple with a
swallow_assign or some other type with an empty assignment.
(Some traits class can detect the type detail::ignore_type.)

It's easy to do for tuple_basic_no_partial_spec.hpp (no changes to tie
funcs needed).
In addition to the code above, this specialization to
assign_to_pointee should do the trick.
Note that I can't test with Borland, but with gcc it seems to work.

namespace detail {
      struct assign_to_pointee<detail::ignore_type>
        explicit assign_to_pointee(detail::ignore_type* p) {}

        template<typename Other>
        assign_to_pointee& operator=(const Other& other)
          return *this;

This would have the benefit, that you wouldn't have to fiddle with the
#define BOOST_TUPLE_EXTERN macros.

To sum up:

1. Would this work with borland ?
2. Does the compilers that currently have trouble with ignore use
tuple_basic_no_partial_spec.hpp or tuple_basic.hpp or both.
(If only the former, the fix would be easier).
3. Is this worth the trouble or should we just go with Fernando's patch?

When we reach a resolution,
Fernando, could you provide a real patch, that can be run with unix patch?
That way I don't introduce errors as I don't have the borland compiler to
test with.

Cheers, Jaakko

Boost list run by bdawes at, gregod at, cpdaniel at, john at