回答編集履歴

1

appendix

2020/08/05 05:19

投稿

yohhoy
yohhoy

スコア6189

test CHANGED
@@ -23,3 +23,33 @@
23
23
  std::is_same_v<Type, std::weak_ptr<typename Type::element_type>>;
24
24
 
25
25
  ```
26
+
27
+
28
+
29
+ ---
30
+
31
+
32
+
33
+ おまけ:本題からは外れますが、各関数の記述を短縮表記することもできます。(`noexcept`は適切でないためついでに削除)
34
+
35
+
36
+
37
+ ```C++
38
+
39
+ template<IsArray Ar>
40
+
41
+ auto identification(const Ar&)noexcept{
42
+
43
+ std::cout << "array" << std::endl;
44
+
45
+ }
46
+
47
+ // ↓
48
+
49
+ auto identification(IsArray auto const &) {
50
+
51
+ std::cout << "array" << std::endl;
52
+
53
+ }
54
+
55
+ ```