nagual
I write example code for tuples::tuple::get use tuples::tie. If compile icl (Intel C++) v 7.1 or bcc32 (Borland) v 5.6.4 all ok, but if compile g++ (GCC) v 3.2.2 or cl (MSVC) v 13.00.9466 - i have eror. ;-c I need to use it in MSVC. Help me! <snip>
Older compilers performed only minimal parsing of templates before they were instantiated, but the standard says they must do more parsing. This requires that you tell them which dependent names (names of things that depend on a template parameter) are being used as type or template names. You need to put the keyword "template" in front of "get<num>" so that the compiler can parse it correctly. Ben.
Hello, Ben!
You wrote on Thu, 11 Sep 2003 15:08:51 +0100:
BH> Older compilers performed only minimal parsing of templates before
BH> they were instantiated, but the standard says they must do more
BH> parsing. This requires that you tell them which dependent names
BH> (names of things that depend on a template parameter) are being
BH> used as type or template names. You need to put the keyword
BH> "template" in front of "get<num>" so that the compiler can parse
BH> it correctly.
I correct line 12 & 13:
tie(i1, i2, i3, c1, c2, c3).template get<num>() = t;
cout<
Hello, Ben!
You wrote on Thu, 11 Sep 2003 15:08:51 +0100:
BH> Older compilers performed only minimal parsing of templates before
they were instantiated, but the standard says they must do more
parsing. This requires that you tell them which dependent names
(names of things that depend on a template parameter) are being
used as type or template names. You need to put the keyword
"template" in front of "get<num>" so that the compiler can parse
it correctly.
I correct line 12 & 13:
tie(i1, i2, i3, c1, c2, c3).template get<num>() = t;
cout<
participants (2)
-
Ben Hutchings
-
nagual