longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:118:67: error: no matching function for call to 'std::chrono::duration<long int>::duration(double)'
118 | if(N>50) std::this_thread::sleep_for(std::chrono::seconds(0.05));
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:101,
from longesttrip.cpp:2:
/usr/include/c++/10/chrono:429:14: note: candidate: 'template<class _Rep2, class _Period2, class> constexpr std::chrono::duration<_Rep, _Period>::duration(const std::chrono::duration<_Rep, _Period>&) [with _Rep2 = _Rep2; _Period2 = _Period2; <template-parameter-2-3> = <template-parameter-1-3>; _Rep = long int; _Period = std::ratio<1>]'
429 | constexpr duration(const duration<_Rep2, _Period2>& __d)
| ^~~~~~~~
/usr/include/c++/10/chrono:429:14: note: template argument deduction/substitution failed:
longesttrip.cpp:118:67: note: mismatched types 'const std::chrono::duration<_Rep1, _Period1>' and 'double'
118 | if(N>50) std::this_thread::sleep_for(std::chrono::seconds(0.05));
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:101,
from longesttrip.cpp:2:
/usr/include/c++/10/chrono:422:23: note: candidate: 'template<class _Rep2, class> constexpr std::chrono::duration<_Rep, _Period>::duration(const _Rep2&) [with _Rep2 = _Rep2; <template-parameter-2-2> = <template-parameter-1-2>; _Rep = long int; _Period = std::ratio<1>]'
422 | constexpr explicit duration(const _Rep2& __rep)
| ^~~~~~~~
/usr/include/c++/10/chrono:422:23: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/vector:60,
from longesttrip.h:1,
from longesttrip.cpp:1:
/usr/include/c++/10/type_traits: In substitution of 'template<bool _Cond, class _Tp> using __enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
/usr/include/c++/10/type_traits:2195:11: required by substitution of 'template<class ... _Cond> using _Require = std::__enable_if_t<std::__and_< <template-parameter-1-1> >::value> [with _Cond = {std::is_convertible<const double&, long int>, std::__or_<std::chrono::treat_as_floating_point<long int>, std::__not_<std::chrono::treat_as_floating_point<double> > >}]'
/usr/include/c++/10/chrono:419:27: required from here
/usr/include/c++/10/type_traits:2192:11: error: no type named 'type' in 'struct std::enable_if<false, void>'
2192 | using __enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:101,
from longesttrip.cpp:2:
/usr/include/c++/10/chrono:415:2: note: candidate: 'constexpr std::chrono::duration<_Rep, _Period>::duration(const std::chrono::duration<_Rep, _Period>&) [with _Rep = long int; _Period = std::ratio<1>]'
415 | duration(const duration&) = default;
| ^~~~~~~~
/usr/include/c++/10/chrono:415:11: note: no known conversion for argument 1 from 'double' to 'const std::chrono::duration<long int>&'
415 | duration(const duration&) = default;
| ^~~~~~~~~~~~~~~
/usr/include/c++/10/chrono:413:12: note: candidate: 'std::chrono::duration<_Rep, _Period>::duration() [with _Rep = long int; _Period = std::ratio<1>]'
413 | constexpr duration() = default;
| ^~~~~~~~
/usr/include/c++/10/chrono:413:12: note: candidate expects 0 arguments, 1 provided