This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: rdbuf()?



> In Josuttis "The Standard C++ Library", 13.10.3, there is a function
> rdbuf () that takes an argument to set the stream buffer.  I want to
> use it to redirect input.
> 
> AFAICT, there is no rdbuf() taking any argument in libstdc++ that
> comes with gcc-3.0.1.

But there is.  Look in $prefix/include/g++-v3/bits/basic_ios.h, where
$prefix is where you installed gcc.  You'll see that
basic_ios<CharT,Traits> defines two rdbuf functions, the second of
which takes a basic_streambuf<CharT,Traits> argument.

I have not tried to use this function myself, but I haven't seen
any indications that it doesn't work.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]