bank.cpp: In function 'int main()':
bank.cpp:16:30: error: wrong number of template arguments (1, should be at least 2)
16 | std::map<std::array<int, 21>>, bool> table;
| ^~
In file included from /usr/include/c++/11/map:61,
from bank.cpp:3:
/usr/include/c++/11/bits/stl_map.h:100:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
100 | class map
| ^~~
bank.cpp:16:32: error: expected unqualified-id before ',' token
16 | std::map<std::array<int, 21>>, bool> table;
| ^
bank.cpp:16:34: error: expected unqualified-id before 'bool'
16 | std::map<std::array<int, 21>>, bool> table;
| ^~~~
bank.cpp: In lambda function:
bank.cpp:20:9: error: 'table' was not declared in this scope; did you mean 'mutable'?
20 | if (table.contains(state)) return table[state];
| ^~~~~
| mutable
bank.cpp:22:14: error: 'table' was not declared in this scope; did you mean 'mutable'?
22 | return table[state] = false;
| ^~~~~
| mutable
bank.cpp:25:14: error: 'table' was not declared in this scope; did you mean 'mutable'?
25 | return table[state] = (a_sum == 0);
| ^~~~~
| mutable
bank.cpp:29:9: error: use of 'brute' before deduction of 'auto'
29 | if (brute(new_state)) {
| ^~~~~
bank.cpp:30:14: error: 'table' was not declared in this scope; did you mean 'mutable'?
30 | return table[state] = true;
| ^~~~~
| mutable
bank.cpp:39:11: error: use of 'brute' before deduction of 'auto'
39 | if (brute(new_state)) { return table[state] = true; }
| ^~~~~
bank.cpp:39:38: error: 'table' was not declared in this scope; did you mean 'mutable'?
39 | if (brute(new_state)) { return table[state] = true; }
| ^~~~~
| mutable
bank.cpp:45:12: error: 'table' was not declared in this scope; did you mean 'mutable'?
45 | return table[state] = false;
| ^~~~~
| mutable
bank.cpp: In function 'int main()':
bank.cpp:51:19: error: no match for call to '(main()::<lambda(auto:16&&, const std::array<int, 21>&)>) (std::array<int, 21>&)'
51 | bool ans = brute(state);
| ~~~~~^~~~~~~
bank.cpp:19:16: note: candidate: 'template<class auto:16> main()::<lambda(auto:16&&, const std::array<int, 21>&)>'
19 | auto brute = [&](auto&& self, const std::array<int, 21>& state) -> bool {
| ^
bank.cpp:19:16: note: template argument deduction/substitution failed:
bank.cpp:51:19: note: candidate expects 2 arguments, 1 provided
51 | bool ans = brute(state);
| ~~~~~^~~~~~~