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] | |
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.Forward/backward incompatibility is really nothing new for libstdc++ (or Microsoft STL either). ;-)As noted in the discussion, that may or may not work with other implementations or future versions of V3. Only you know how portable you want your constructs.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |