Boost logo

Boost :

From: Aleksey Gurtovoy (alexy_at_[hidden])
Date: 2001-06-06 20:24:59

David Abrahams wrote:
> I have moved the boost build system to the "build-development" branch.
> I have also integrated Daryle's latest dlw_oprs submission into the
> operators library.

I should have catched this early, but.. due to default 'void' template
parameters 'output_iterator_helper' fails to compile on MSVC:

template <class T,
          class V = void,
          class D = void,
          class P = void,
          class R = void>
struct output_iterator_helper
  : incrementable<T
  , boost::iterator<std::output_iterator_tag, V, D, P, R
> > {};

MSVC problem with 'void' as default type template parameter is an old one;
one possible workaround is to use 'void*' instead of 'void' if the latter is
just a placeholder for an unsignificant parameter. It's not exactly the case
here, as the standard _requires_ 'difference_type' and 'value_type' of
output iterators to have 'void' type (24.3.1 [lib.iterator.traits]); still,
I haven't yet encountered a case when having output iterator value_type ==
void* instead of plain void would make any difference. Actually, on the
second thought, if those _are_ the requirements, probably
'output_iterator_helper' definition should look like this anyway:

template <class T>
struct output_iterator_helper
  : incrementable<T
  , boost::iterator<std::output_iterator_tag, void, void, void, void
> > {};

I am not sure that "void value_type" requirement is a reasonable one,
though. After reading
per, it seems to me that it may be a defect as well. Thoughts?


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