Abdelrazak Younes wrote:
Andre Poenitz wrote:
On Wed, Oct 31, 2007 at 06:25:31PM +0100, Jean-Marc Lasgouttes wrote:
Abdelrazak Younes <[EMAIL PROTECTED]> writes:
If somebody use the docstream with latin8 character we will have bugs
for sure.
How could we forbid 8bit chars to operator<<? By implementing a
private version?
Sort of. Declare but not implement it.
Problem is... that it is already implemented:
inline
odocstream & operator<<(odocstream & os, char c)
{
os.put(c);
return os;
}
Putting an BOOST_ASSERT(false) here or throwing an exception would
achieve what you want JMarc.
But we cannot do that right now because this operator is used by mathed.
Andre', I think the next big thing in mathed is to move to unicode and
to remove any font related business from there.
WriteStream & operator<<(WriteStream & ws, char c)
{
if (ws.pendingSpace()) {
if (isAlphaASCII(c))
ws.os() << ' ';
ws.pendingSpace(false);
}
ws.os() << c;
if (c == '\n')
ws.addlines(1);
return ws;
}
Abdel.