K
kristian
Is the following function portable according to C++03 given any
compliant stream locale and a compliant compiler:
void parenthesize(std::wostream &out, int i)
{
out << out.widen('(') << i << out.widen(')');
}
What I'm mostly concerned about is the use of widen() and the encoding
of the character literals passed as argument - given the fact that the
used characters are part of the basic source character set.
compliant stream locale and a compliant compiler:
void parenthesize(std::wostream &out, int i)
{
out << out.widen('(') << i << out.widen(')');
}
What I'm mostly concerned about is the use of widen() and the encoding
of the character literals passed as argument - given the fact that the
used characters are part of the basic source character set.