Boost logo

Boost :

From: Martyn Lovell (martynl_at_[hidden])
Date: 2005-07-06 22:59:54


> The original rationale for deprecating memcpy makes sense, but I don't see

> any connection to sgetn. Memcpy takes two buffers, sgetn just one.
> basic_streambuf::sgetn, like, basic_istream::read, is exactly analogous to

> fread from stdio.h, which AFAICT has not been deprecated.

Sgetn/bi::read have two different kinds of things to deal with - items read
from the stream, and items written to the output buffers. Not exactly the
same as memcpy, but related. We actually did consider doing the same to
fread, but this change never made it into one of the shipping betas.

> Would you mind giving a quick description of how to mark an iterator as
> checked, or posting a url?

This doc describes use of the checked iterators we have defined:

http://msdn2.microsoft.com/library/y9ww7c1a(en-us,vs.80).aspx

Are you looking to take your existing iterators and mark them as checked?

Martyn Lovell
Development Lead
Visual C++ Libraries


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