質問編集履歴
2
追記修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -66,7 +66,7 @@
|
|
66
66
|
|
67
67
|
int main() {
|
68
68
|
|
69
|
-
std::vector<std::function<void(Iterator, Iterator, Compare)>> functions{SelectionSort,
|
69
|
+
std::vector<std::function<void(Iterator, Iterator, Compare)>> functions{SelectionSort, std::sort};
|
70
70
|
|
71
71
|
}
|
72
72
|
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -47,3 +47,27 @@
|
|
47
47
|
|
48
48
|
|
49
49
|
[コード全文 [Wandbox]三へ( へ՞ਊ ՞)へ ハッハッ](https://wandbox.org/permlink/DoDfroM2WmU81fAO)
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
---
|
54
|
+
|
55
|
+
## 追記
|
56
|
+
|
57
|
+
下記のように`function`を試してみたのですが、エラーになります。
|
58
|
+
|
59
|
+
```C++
|
60
|
+
|
61
|
+
using Iterator = std::vector<int>::iterator;
|
62
|
+
|
63
|
+
using Compare = std::function<bool(int, int)>;
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
int main() {
|
68
|
+
|
69
|
+
std::vector<std::function<void(Iterator, Iterator, Compare)>> functions{SelectionSort, InsertionSort};
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
```
|