Problem 3nplus1II
User SMILE
Submission Time 2024-04-20 10:45:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1II.cpp:8:1: error: deduction guide for ‘std::function<_Signature>’ must have trailing return type
8 | function(){
| ^~~~~~~~
In file included from /usr/include/c++/9/functional:59,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from 3nplus1II.cpp:1:
/usr/include/c++/9/bits/std_function.h:128:11: note: ‘template<class _Signature> class std::function’ declared here
128 | class function;
| ^~~~~~~~
3nplus1II.cpp: In function ‘int main()’:
3nplus1II.cpp:21:13: error: cannot deduce template arguments for ‘function<...auto...>’ from ()
21 | function();
| ^
3nplus1II.cpp:25:13: error: expected ‘;’ before ‘return’
25 | cout<<"-1"
| ^
| ;
2