help-gplusplus
[Top][All Lists]
Advanced

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

Re: inline constructors and assignment operators


From: Thomas Maeder
Subject: Re: inline constructors and assignment operators
Date: Thu, 09 Feb 2006 19:26:20 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

"Michael D. Berger" <m.d.berger@ieee.org> writes:

> Are inline constructors and assignment operators ok?
> They are very short, but I head that there may be a problem.

The problems, if any, are the same as for other member functions:

Conceptually, encapsulation is at least partially broken if a class
reveals (part of) its implementation details.

"Physically", modifications on an inline member function require
tranlation units depending on the definition of the member's class to
be recompiled. Modifications of encapsulated member functions'
definitions only require the translation unit containing the modified
member functions' definitions to be recompiled. This can be a huge
difference.


reply via email to

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