permutation.cpp:288:10: error: 'weak_ordering' in namespace 'std' does not name a type
288 | std::weak_ordering operator<=>(const BigInteger &other) const {
| ^~~~~~~~~~~~~
permutation.cpp:288:5: note: 'std::weak_ordering' is only available from C++2a onwards
288 | std::weak_ordering operator<=>(const BigInteger &other) const {
| ^~~
permutation.cpp:489:10: error: 'weak_ordering' in namespace 'std' does not name a type
489 | std::weak_ordering operator<=>(const Rational &other) const {
| ^~~~~~~~~~~~~
permutation.cpp:489:5: note: 'std::weak_ordering' is only available from C++2a onwards
489 | std::weak_ordering operator<=>(const Rational &other) const {
| ^~~
permutation.cpp: In function 'int find_order(node*, BigInteger, int&)':
permutation.cpp:622:31: error: no match for 'operator<' (operand types are 'BigInteger' and 'BigInteger')
622 | if (get_sm(t->l) + t->val < value) {
| ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~
| | |
| BigInteger BigInteger
permutation.cpp:622:31: note: candidate: 'operator<(int, int)' (built-in)
622 | if (get_sm(t->l) + t->val < value) {
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
permutation.cpp:622:31: note: no known conversion for argument 2 from 'BigInteger' to 'int'
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from permutation.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:489:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
489 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:489:5: note: template argument deduction/substitution failed:
permutation.cpp:622:33: note: 'BigInteger' is not derived from 'const std::pair<_T1, _T2>'
622 | if (get_sm(t->l) + t->val < value) {
| ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from permutation.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:366:5: note: candidate: 'template<class _Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)'
366 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:366:5: note: template argument deduction/substitution failed:
permutation.cpp:622:33: note: 'BigInteger' is not derived from 'const std::reverse_iterator<_Iterator>'
622 | if (get_sm(t->l) + t->val < value) {
| ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from permutation.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:404:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
404 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:404:5: note: template argument deduction/substitution failed:
permutation.cpp:622:33: note: 'BigInteger' is not derived from 'const std::reverse_iterator<_Iterator>'
622 | if (get_sm(t->l) + t->val < value) {
| ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from permutation.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1451:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
1451 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1451:5: note: template argument deduction/substitution failed:
permutation.cpp:622:33: note: 'BigInteger' is not derived from 'const std::move_iterator<_IteratorL>'
622 | if (get_sm(t->l) + t->val < value) {
| ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from permutation.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1507:5: note: candidate: 'template<class _Iterator> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)'
1507 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1507:5: note: template argument deduction/substitution failed:
permutation.cpp:622:33: note: 'BigInteger' is not derived from 'const std::move_iterator<_IteratorL>'
622 | if (get_sm(t->l) + t->val < value) {
| ^~~~~
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from permutation.cpp:1:
/usr/include/c++/10/bits/basic_string.h:6267:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
6267 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6267:5: note: template argument deduction/substitution failed:
permutation.cpp:622:33: note: 'BigInteger' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
622 | if (get_sm(t->l) + t->val < value) {
| ^~~~~
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from permutation.cpp:1:
/usr/include/c++/10/bits/basic_string.h:6280:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)'
6280 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6280:5: note: template argument deduction/substitution failed:
permutation.cpp:622:33: note: 'BigInteger' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
622 | if (get_sm(t->l) + t->val < value) {
| ^~~~~
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from permutation.cpp:1:
/usr/include/c++/10/bits/basic_string.h:6292:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
6292 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6292:5: note: template argument deduction/substitution failed:
permutation.cpp:622:33: note: mismatched types 'const _CharT*' and 'BigInteger'
622 | if (get_sm(t->l) + t->val < value) {
| ^~~~~
In file included from /usr/include/c++/10/bits/ios_base.h:46,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from permutation.cpp:1:
/usr/include/c++/10/system_error:252:3: note: candidate: 'bool std::operator<(const std::error_code&, const std::error_code&)'
252 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/10/system_error:252:31: note: no known conversion for argument 1 from 'BigInteger' to 'const std::error_code&'
252 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/10/system_error:379:3: note: candidate: 'bool std::operator<(const std::error_condition&, const std::error_condition&)'
379 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/10/system_error:379:36: note: no known conversion for argument 1 from 'BigInteger' to 'const std::error_condition&'
379 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/10/vector:67,
from permutation.cpp:4:
/usr/include/c++/10/bits/stl_vector.h:1930:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)'
1930 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1930:5: note: template argument deduction/substitution failed:
permutation.cpp:622:33: note: 'BigInteger' is not derived from 'const std::vector<_Tp, _Alloc>'
622 | if (get_sm(t->l) + t->val < value) {
| ^~~~~
permutation.cpp: In function 'void solve()':
permutation.cpp:658:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
658 | auto [l, r] = split(root, pos - 1);
| ^
permutation.cpp: In function 'int find_order(node*, BigInteger, int&)':
permutation.cpp:629:1: warning: control reaches end of non-void function [-Wreturn-type]
629 | }
| ^