Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2002-05-17 07:23:19


On Friday, May 17, 2002, at 01:43 PM, Neal D. Becker wrote:

>>>>>> "Victor" == Victor A Wagner, <vawjr_at_[hidden]> writes:
>
> Victor> At Thursday 2002/05/16 10:27, you wrote:
>>> The problem seems to be:
>>>
>>> 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<result_type>(os, " "));
>
> Victor> std::copy(s.v, s.v+k,
> Victor>
> std::ostream_iterator<shuffle_output::result_type>(os, " "));
>
> Victor> won't that work??
>
> I would have guessed that would work, but it doesn't. gcc-3.1 gives a
> parse error.
>
> I don't know what is a good fix for this problem.

On the gcc-3.1 version of Apple for Darwin/MacOS X I got it to
work just by adding another include:

#include <iterator> // std::ostream_iterator

I have sent the patch with a few extensions to boost::random to
Jens, but I guess fixing this is more urgent than the extensions
I sent to Jens. The same patch is needed in
boost/random/mersenne_twister.hpp

Best regards,

Matthias


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