【初心者歓迎】C/C++室 Ver.92【環境依存OK】
■ このスレッドは過去ログ倉庫に格納されています
0824デフォルトの名無しさん
2014/09/26(金) 01:26:28.66ID:YOGKKWNYメンバ関数を呼び出す時templateが妙な所に付いてるだろ?
これは
§14.2.4
When the name of a member template specialization appears after . or -> in a postfix-expression
or after a nested-name-specifier in a qualified-id, and the object expression of the postfix-expression
is type-dependent or the nested-name-specifier in the qualified-id refers to a dependent type, but
the name is not a member of the current instantiation (14.6.2.1), the member template name must be
prefixed by the keyword template. Otherwise the name is assumed to name a non-template.
これに倣ったものだ
gcc4.8.1だとtemplate無しでもなぜかエラーにならないけど
■ このスレッドは過去ログ倉庫に格納されています