This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project. See the libstdc++ home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

locale/file/style questions





I have some questions--Nathan, I figure you'll know the stuff about
4), but any answers would be appreciated.

1) seemingly, synch could have no return value. Is a non-zero return
value supposed to indicate failure to sync the basic_streambuf
internal buffer with the external representation of string of file?

2) Have a style guide for comments, and ctor initialization
lists. Also, think about putting type_defs at top of classes, data
members next, then standard-conforming member functions, then
extensions and depricated mf's at the end. Also use of this-> and
namespace indentation spaces would be cool, along with a revision of
<ubtm, int> to allow spaces. What about explicitly specifying void, as
that is one of the things where c++ differs from c, and I've always
thought it helpful to explicitly specify void.

	for comments, I'm in favor of
// Capital letter ending with a period.

Also need some comment on the use of casts, and mandating the new-style.

3)filebuf::imbue says "if file not positioned at its beginning". What
does this mean--assuming you have the underlying FILE* and a set of
pointers in streambuf, which one is the FILE in question? I'm assuming
the pointers and not the acutal representation of the file
object. Then the question is, the input or output sequence? Ugh. How
about both, that's how i currently have decided the question

4) code_cvt
Nathan, I know Matt already brought up some questions about codecvt.
What are the current revisions to codecvt?

I get that use_facet and has_facet are how this is
supposed to be done. However, how do I get the result enum from the
codecvt::unshift(...) member function if I invoke it as follows:


codecvt_type __cvt = use_facet<codecvt_type>(this->getloc()).unshift(__st, _IO_out_cur, _IO_out_end, __last); 

what is the syntax to caputure the result of unshift?

-Benjamin