This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-3.1 boost-1.28.0 problem


We have a patch for the problem.  My diagnosis of the problem was
incorrect.  The problem was that you need to add

#include <iterator>

to both mersenne_twister.hpp and shuffle_output.hpp or you don't get
the definition for std::ostream_iterator.

But this brings up another gcc bug!  I had proposed a completely bogus
fix for the problem, which gcc-3.1 happily accepted!

What I had suggested is to change shuffle_output.hpp to say:

  friend std::ostream& operator<<(std::ostream& os, const shuffle_output& s)
  {
    os << s._rng << " " << s.y << " ";
    std::copy(s.v, s.v+k, std::ostream_iterator<s.result_type>(os, " "));
    return os;
  }

This is nonsense, as you can't refer to a type using ".", but gcc
doesn't complain at all.  Stranger still, it also doesn't complain
about the still undefined std::ostream_iterator.

If it is needed I can try to put together a simple test case.  Right
now all I have is a large program which I can't post.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]