【初心者歓迎】C/C++室 Ver.5【環境依存OK】
■ このスレッドは過去ログ倉庫に格納されています
0484476じゃないけど
NGNG| 14.6 Name resolution
| 1 Three kinds of names can be used within a template definition:
| The name of the template itself, and names declared within the template itself.
| Names dependent on a template parameter(14.6.2).
| Names from scopes which are visible within the template definition.
テンプレートの定義内で使用可能な名前は以下の 3 種類である。
・テンプレートの名前自身、およびテンプレート自身の内部で宣言された名前
・テンプレートパラメータに依存した名前
・テンプレート定義時点で可視のスコープ内の名前
result_type はこれらのいずれでもないので使用不可能。
で、>>477 みたいにテンプレートパラメータに依存した名前にしてやれば使用可能。
…ってことで OK ですか?
■ このスレッドは過去ログ倉庫に格納されています