This is the mail archive of the
mailing list for the GCC project.
- To: nbecker at fred dot net
- Subject: Re: rdbuf()?
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Fri, 12 Oct 2001 17:39:56 -0700 (PDT)
- Cc: gcc at gcc dot gnu dot org
> 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.