Followup to All: I have spent almost 2 hours going over the code at the gcc libstdc++ repository (not easy to navigate, had to step off the website and search it externally using Google to quickly locate pertinant items) and have found out the true story on skipws only working on istreams.
Basically, a special member function is created for the std::basic_istream<_CharT, _Traits>::sentry class that looks at the Boolean flag for skipws and uses the one character at a time sgetc() to laboriously step through the stream to examine the current character to see if it is a whitespace character (which depends upon the locale settings too), and if so, jumps over the character and goes to the next. This is just as we expected. I am not sure of how easy it is to create a member function for std::basic_ostream<_CharT, _Traits>::sentry class, because sentry is the internal layer for setting up the streams, and is not exposed at the top layers. All these functions are heavily templatized. This discussion probably should be moved to Technical talk group??? In the meantime, I will simply use the "cat file | tr -d " " > stripped_file" command to do the work. I really would like to see the skipws work for ostreams, of course. - Logical American References: (for the truly technical GCC GNU C++ geeks) http://manpages.ubuntu.com/manpages/lucid/man3/std::basic_istream_sentry.3.html http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a00912_source.html http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a00411.html http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-api-4.5/a00903_source.html http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a00968_source.html _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
