
Gennadiy Rozental ha escrito:
P.S. BTW could anybody give some hint on "very short" error message by Intel compiler here: http://tinyurl.com/2c2zy
The problem seems to lie in that basic_cstring<>::npos is an unnamed enum, and ICC does not like it to be passed as a template arg (I don't actually know if this is a conformant diagnostic.) Anyway, the problem goes away (confirmed in ICC 7.1) with the folowing patch in basic_cstring.hpp:
Thanks, Joaquín
Applied. Is it indeed invalid?
I've investigated a little, and seems like it is really invalid. Comeau online yields the following: template<typename T> void foo(const T& t) { } enum{bar=0}; int main() { foo(bar); } Comeau C/C++ 4.3.3 (Aug 6 2003 15:13:37) for ONLINE_EVALUATION_BETA1 Copyright 1988-2003 Comeau Computing. All rights reserved. MODE:strict errors C++ "ComeauTest.c", line 10: error: a template argument may not reference an unnamed type foo(bar); ^ So the patch puts you on the safe side. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo