Boost logo

Boost Users :

Subject: Re: [Boost-users] iostreams: streambuf class fails to compile on type check
From: Dan Bloomquist (boost_at_[hidden])
Date: 2016-03-14 13:18:49


Steven Watanabe wrote:
> AMDG
>
> It fails because char_array_buffer doesn't meet
> the requirements of boost::iostreams::stream.
>
> T - A CopyConstructible model of one of the Device concepts
>
> http://www.boost.org/doc/libs/1_60_0/libs/iostreams/doc/guide/generic_streams.html#stream_params
>
> In particular, it is not CopyConstructible.
Hi Steven,
Thanks. I tried a deceleration of every kind of constructor. It may be
that I hit that because somewhere I could not resolve where my class
gets cast to constant when trying to use my own streambuf rather than a
device:

c:\cpp\boost_1_60\modular-boost\boost\iostreams\detail\adapter\concept_adapter.hpp(68):
error C2440: 'initializing': cannot convert from 'const
rtf::rtf_stream_buffer<rtf::my_dev<Char>>' to
'rtf::rtf_stream_buffer<rtf::my_dev<Char>> '

When my_dev is derived from a streambuf, boost or standard.

is the likes of:
boost::iostreams::stream< my_or_std_streambuf >...
is just not doable? It almost works. I could not find a single example
of using a specialized stream_buffer with boost stream.
I'll come back to this someday. For now I'm running out of brain cells
and I need to deal with my task at hand.

Best, Dan.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net