Пример #1
0
template <typename Iter, typename Traits> NEXTWEB_INLINE typename StreamBuffer<Iter, Traits>::IntType
StreamBuffer<Iter, Traits>::fill() {
	std::size_t size = 0;
	for (; end_ != current_ && size < BUFFER_SIZE; ++current_, ++size) {
		buffer_[size] = *current_;
	}
	setg(buffer_, buffer_, buffer_ + size);
	return Traits::to_int_type(buffer_[0]);
}
Пример #2
0
template <typename Iter, typename Traits> NEXTWEB_INLINE
StreamBuffer<Iter, Traits>::StreamBuffer(Iter begin, Iter end) :
	BaseType(), current_(begin), begin_(begin), end_(end)
{
	setg(buffer_, buffer_, buffer_);
}