This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: user-defined types and basic_string
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: "Anthony Feick" <afeick at hotmail dot com>
- Cc: bkoz at redhat dot com, libstdc++ at gcc dot gnu dot org
- Date: 30 Aug 2002 21:50:15 +0200
- Subject: Re: user-defined types and basic_string
- Organization: Integrable Solutions
- References: <F156IH7LFnq8Ui7rzCQ00006de3@hotmail.com>
"Anthony Feick" <afeick@hotmail.com> writes:
| >
| > inline character<unsigned short>
| > as_character(unsigned short c)
| > {
| > character<unsigned short> r = { c };
| > return c;
| > }
| >
| >With inlining and the named return value optimization, that should
| >cost nothing.
| >
|
| Unfortunatley the cost is changing a LOT of code for us. Our code is a
| mess, and it is just not worth it if "char_traits<unsigned short>" will fix
| it for us easily.
Well, as I said earlier that you're free to invoke an undefined
behavior in your code -- that is entirely your responsability. But,
please, don't make a fuss about it, especially when we warn you about
the non-portability of the thingy.
Yours,
-- Gaby