
On 9/28/05, David Abrahams <dave@boost-consulting.com> wrote:
Hmm... Also, is the apparent dependency on ASCII encoding truly portable?
Caleb Epstein wrote:
Doubtful. Wouldn't testing for std::isalnum || '-' || '_' be a better idea? Perhaps not quite as performant (once the lookup table was made static), but certainly more portable and simpler to read.
Simon Buchan wrote:
In most implementations, the is*()'s are implemented using exactly the same method.
Yes, but the table will be different on an EBCDIC implementation than they are on an ASCII implementation. The point is that the specified table hard codes ASCII, so when somebody runs it on an IBM mainframe it will give the wrong answer. -- Martin Bonner Martin.Bonner@Pitechnology.com Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 441434