|
Boost : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-09-22 16:19:10
John Torjo wrote:
> Rob Stewart wrote:
>> Agreed, but pipes ("|") are easier to grok:
>>
>> "<elem> | </elem><elem> | </elem>"
>>
>
> That's fine too.
This again runs into the problem of what if you want '|' in your format
string? One possibility is to use non-printable characters, e.g. \xFF,
but I don't think this would have widespread support.
Implementing escaping for the above will complicate the evaluation of
the format string as you cannot use str.find( "|" ). One possibility is
to check if '\' exists before '|' after a find; if yes, repeat. Thus '\'
becomes context-sensitive. This approach leads to "< |\\| >" for "<
a\\b\\c >" formatting being ill-defined.
Regards,
Reece
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk