[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compilation issues with std::string
From: |
Thomas Maeder |
Subject: |
Re: Compilation issues with std::string |
Date: |
Fri, 16 Feb 2007 18:22:43 +0100 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
"wazz" <wasif.sid@gmail.com> writes:
> I'm trying to define a simple class which extends std::string
std::string wasn't designed to serve as a non-private base class ...
> , as well as provides a method for C-style typecast.
... and, as a rule, conversion operators are a bad idea because of the
surprising behavior they often cause. There's a reason why c_str() is
called c_str() and not operator char const *().