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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

basic_filebuf::_M_underflow_common questions


I've managed to get very far with creating subclasses of
std::__enc_traits to create types that carry enough information for a
particular codeset conversion, but I have a question about
basic_filebuf's _M_underflow_common method.

I see in [1] that a change[2] was made to remove the general template
version of this method in favour of some partial specializations.  The
problem is that I don't understand why I have to re-write
(per-libstdc++-version) this method if I ever change the traits
template parameter to basic_filebuf.  Why do I want to change the
traits template parameter?  That's the only way to change state_type,
which is the only way to specify the codecvt facet that should be used
on a stream... isn't it?

[1] http://gcc.gnu.org/ml/libstdc++-cvs/2002-q3/msg00187.html
[2] http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/fstream.tcc.diff?cvsroot=gcc&r1=1.38&r2=1.39
        
        
-- 
------------------------------------------------------------------
Brad Spencer - spencer@infointeractive.com - "It's quite nice..."
Systems Architect | InfoInterActive Corp. | A Canadian AOL Company


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