This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: user-defined types and basic_string


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]