This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Style of libstdc++ header files
- From: Wolfgang Bangerth <bangerth at ices dot utexas dot edu>
- To: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>, Richard Guenther <richard dot guenther at gmail dot com>
- Cc: gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, bugzilla-masters at dberlin dot org
- Date: Tue, 14 Sep 2004 14:17:08 -0500
- Subject: Re: Style of libstdc++ header files
- References: <200409141904.i8EJ4uZQ012166@taquilee.inria.fr>
> I surely do not understand why it would be more difficult to turn the
> inline definition into a declaration instead of simply deleting it...
That's actually simple to illustrate: think
class X{
void method1 () {...}
void method2 () {...}
void method3 () {...}
void method4 () {...}
};
In order to convert these four definitions into declarations, four edit
operations (mark everything from "{" to "}" and delete) are necessary.
On the other hand, if the code looked like
class X{
void method1 ();
void method2 ();
void method3 ();
void method4 ();
}
void X::method1 () {...}
void X::method2 () {...}
void X::method3 () {...}
void X::method4 () {...}
then I can remove the whole block of definitions with one edit operation (mark
everything from the line of the first to the line with the last definition
and delete).
Since the STL container, string, and iostream classes usually have several
dozen functions, editing every single member function can be a very tedious
process.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ices.utexas.edu
www: http://www.ices.utexas.edu/~bangerth/