breaking compatibility

Loren Osborn loren@reflexive.net
Thu Apr 19 12:25:00 GMT 2001


I wish it were that easy... if it were I would just as soon just #include
<istream.h> and be done with it... The truth of the matter is that we had to
make and conform to certain #include-ing conventions to make all of our
memory checking code work...

our .cpp files generally begin with something like this:

	#include "Reflexive.h"

	// All required system includes here:
	#include <string.h>

	#include "Debug.h"

	// All required project includes here:
	#include "FileName.h"
	#include "OtherRequiredFiles.h"

and our .h files are required to never include any system .h files...

It's kind of a sticky situation, but it does work out for the best, at least
with a project as big as ours...

any other ideas?

-Loren

-----Original Message-----
From: libstdc++-owner@gcc.gnu.org [ mailto:libstdc++-owner@gcc.gnu.org]On
Behalf Of Benjamin Kosnik
Sent: Thursday, April 19, 2001 11:35 AM
To: Loren Osborn
Cc: libstdc++@gcc.gnu.org
Subject: RE: breaking compatibility



Why don't you just use iosfwd? It's specifically designed to do the
forward decls for you.

-benjamin


> 	typedef class std::basic_istream<char, std::char_traits<char> > istream;
>
> The easiest work around I can think of for this problem would be to,
> instead, declare istream:
>
> 	class istream : public std::basic_istream<char, std::char_traits<char> >
> {};



More information about the Libstdc++ mailing list