octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ISO C++ and Octave


From: Mumit Khan
Subject: Re: ISO C++ and Octave
Date: Tue, 30 Jan 2001 21:53:08 -0600 (CST)

On Tue, 30 Jan 2001, John W. Eaton wrote:

> | 3. This is the sticky one - the interface to the streams has changed
> | significantly and so we do need to update anything built on top of
> | std::filebuf. 
> 
> If I can build a current snapshot of gcc 3.0 maybe I can get an idea
> of how hard this would be to fix.
> 
> Do you think it would be possible to write code that would work with
> both old and new compilers in these cases?  If not, then the idea of
> using a macro seems OK, or we can hide the details in some function(s).

Ok, here's my take on this after another not so quick a look. It's quite
easy to add in the ISO conformant bits to the various stream classes,
and I believe I can make it reasonably clean with a macro and a few other
typedefs. Since the class interfaces have changed, it's hard to hide it
without adding extra complexity.

The trouble I can see is in octave_stream::file_number(), which gets you 
the file descriptor. This as it stands just won't work. Various other
libraries still have this as an extension (eg., Sun Workshop 5.0), but
not the GNU libstdc++ v3. The choice may be add a shim streambuf that
maintains the fd, and use that instead of casting it to std::filebuf.

I'm a bit confused about the various streams and sundry classes currently
used, so if anyone has a quick diagram of what is what, it would help me
quite a bit.

Regards,
Mumit




reply via email to

[Prev in Thread] Current Thread [Next in Thread]