/in/foo.cc: In function 'll euler_phi(ll)':
/in/foo.cc:60:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
60 | for (auto [p, cnt] : factors) {
| ^
/in/foo.cc: In function 'void generate_divisors(const std::vector<std::pair<long long int, int> >&, int, ll, std::vector<long long int>&)':
/in/foo.cc:68:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
68 | if (index == factors.size()) {
| ~~~~~~^~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:195:22: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
195 | auto [p, m_val] = st.top();
| ^
/in/foo.cc:204:29: error: no matching function for call to 'max(ll&, int&)'
204 | left_j = max(left_j, j_min);
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/string:50,
from /usr/include/c++/12/bits/locale_classes.h:40,
from /usr/include/c++/12/bits/ios_base.h:41,
from /usr/include/c++/12/ios:42,
from /usr/include/c++/12/ostream:38,
from /usr/include/c++/12/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/12/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/12/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
/in/foo.cc:204:29: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
204 | left_j = max(left_j, j_min);
| ~~~^~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/12/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
/in/foo.cc:204:29: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
204 | left_j = max(left_j, j_min);
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/algorithm:61,
from /in/foo.cc:3:
/usr/include/c++/12/bits/stl_algo.h:5746:5: note: candidate: 'template<class _Tp> _Tp std::max(initializer_list<_Tp>)'
5746 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/12/bits/stl_algo.h:5746:5: note: template argument deduction/substitution failed:
/in/foo.cc:204:29: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
204 | left_j = max(left_j, j_min);
| ~~~^~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_algo.h:5756:5: note: candidate: 'template<class _Tp, class _Compare> _Tp std::max(initializer_list<_Tp>, _Compare)'
5756 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/12/bits/stl_algo.h:5756:5: note: template argument deduction/substitution failed:
/in/foo.cc:204:29: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
204 | left_j = max(left_j, j_min);
| ~~~^~~~~~~~~~~~~~~