Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 1998-12-06 09:39:13

At 07:41 PM 12/4/98 -0700, Greg wrote:

>It looks really good up there. Do I get my picture in cyberspace

Anybody who contributes anything gets their picture in cyberspace!
(Unless they are shy.)

>At some point (after we ship Oracle8i) I'll think some more about
>random iterators.

The background on the above is that when Greg looked at my min_rand
class, he commented that it was very close to being useful as an STL
compliant input iterator.

I tried to work that out, but got hung up on termination. For
example, if you wanted 1000 random numbers in a vector, you could
write something like:

   min_rand rng;
   vector<long> vec( rng, ??? ); // oops! no way to specify end
A third container-like class is needed, I think. end() would return
begin() would return an iterator with operator++() which returned
++rng for 1000 calls, then returned 0:

   min_rand rng;
   iter_counter itrc( rng, 1000 );
   vector<long> vec( itrc.begin(), itrc.end() );

Anyhow, that is the problem Greg is thinking about.



Free Web-based e-mail groups --

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