On Thu, May 19, 2005 at 07:13:27PM +0200, Gabriel Dos Reis wrote:
Douglas Gregor <doug.gregor@gmail.com> writes:
[...]
| does the right thing. We might also want to mark operator[] with the
| "always_inline" attribute,
Ahem, no.
| so that we never get two conflicting definitions of the same code.
If the names are properly reroutedm we should not get that confilt.
For std::string we don't provide a separate __gnu_norm::basic_string and
a __gnu_debug::basic_string, we just add some assertions to
std::basic_string if debug mode is enabled.
This means the names are identical, but the instantiation in the lib
does not have the assertions, while the implicit instantiation in the
user's objects has the assertions - i.e. genuine ODR.