user-defined types and basic_string
Gabriel Dos Reis
gdr@integrable-solutions.net
Fri Aug 30 12:54:00 GMT 2002
"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
More information about the Libstdc++
mailing list