回答編集履歴
1
refinement
test
CHANGED
@@ -2,11 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
C++17言語仕様 §17.7.1 Implicit instantiation [temp.inst], Paragraph 1 に下記ノートが記載されています。
|
5
|
+
テンプレート関数に含まれるローカルクラス(およびローカル構造体)は依存名(dependent name)とみなす仕様となっています。関連する話題として [CWG#1484 Unused local classes of function templates ](http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1484) があり、C++17言語仕様 §17.7.1 Implicit instantiation [temp.inst], Paragraph 1 には下記ノートが記載されています。
|
10
6
|
|
11
7
|
> [Note: Within a template declaration, a local class (12.4) or enumeration and the members of a local class are never considered to be entities that can be separately instantiated (this includes their default arguments, noexcept-specifiers, and non-static data member initializers, if any). As a result, the dependent names are looked up, the semantic constraints are checked, and any templates used are instantiated as part of the instantiation of the entity within which the local class or enumeration is declared. -- end note]
|
12
8
|
|