How to Compile libstdc++ v3 by gcc 2.95.3?
John Love-Jensen
eljay@adobe.com
Mon Apr 15 04:52:00 GMT 2002
Hi Chih-Wei,
Not that this will help with your compile issue, but...
You shouldn't inherit from the STL classes. Notice that std::stack<> does
not have a virtual destructor -- a big red flag saying "don't (publically)
inherit from me!"
Use containment (i.e., member variable). Or, if you really have to,
private/protected inheritance.
(Yet another scenario where "explicit typedef" would be an effective
solution.)
--Eljay
On 4/15/02 6:38 AM, "Chih-Wei Chiu" <jwchiu@csie.nctu.edu.tw> wrote:
> Program Listing
> ===============
> #include <stack>
> class bar : public std::stack<int> {};
> int main( int argc, char* argv[] ) { return 0; }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20020415/3a3885eb/attachment.htm>
More information about the Libstdc++
mailing list