foo.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:62,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/ext/type_traits.h:162:35: error: 'bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
162 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/9/ext/type_traits.h:157:5: note: previous declaration 'template<class _Type> bool __gnu_cxx::__is_null_pointer(_Type)'
157 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/9/ext/type_traits.h:162:26: error: 'nullptr_t' is not a member of 'std'
162 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/9/bits/move.h:55,
from /usr/include/c++/9/bits/stl_pair.h:59,
from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/type_traits:361:31: error: 'std::size_t' has not been declared
361 | template<typename _Tp, std::size_t _Size>
| ^~~~~~
/usr/include/c++/9/type_traits:362:25: error: '_Size' was not declared in this scope
362 | struct is_array<_Tp[_Size]>
| ^~~~~
/usr/include/c++/9/type_traits:362:31: error: template argument 1 is invalid
362 | struct is_array<_Tp[_Size]>
| ^
/usr/include/c++/9/type_traits:560:42: error: 'nullptr_t' is not a member of 'std'
560 | struct __is_null_pointer_helper<std::nullptr_t>
| ^~~~~~~~~
/usr/include/c++/9/type_traits:560:42: error: 'nullptr_t' is not a member of 'std'
/usr/include/c++/9/type_traits:560:51: error: template argument 1 is invalid
560 | struct __is_null_pointer_helper<std::nullptr_t>
| ^
/usr/include/c++/9/type_traits:949:26: error: 'size_t' has not been declared
949 | template<typename _Tp, size_t _Num>
| ^~~~~~
/usr/include/c++/9/type_traits:950:49: error: '_Num' was not declared in this scope
950 | struct __is_nt_constructible_impl<true, _Tp[_Num]>
| ^~~~
/usr/include/c++/9/type_traits:950:54: error: template argument 2 is invalid
950 | struct __is_nt_constructible_impl<true, _Tp[_Num]>
| ^
/usr/include/c++/9/type_traits:1246:37: error: 'size_t' is not a member of 'std'
1246 | : public integral_constant<std::size_t, alignof(_Tp)> { };
| ^~~~~~
/usr/include/c++/9/type_traits:1246:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/9/type_traits:1246:57: error: template argument 1 is invalid
1246 | : public integral_constant<std::size_t, alignof(_Tp)> { };
| ^
/usr/include/c++/9/type_traits:1246:57: note: invalid template non-type parameter
/usr/include/c++/9/type_traits:1251:37: error: 'size_t' is not a member of 'std'
1251 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/include/c++/9/type_traits:1251:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/9/type_traits:1251:46: error: template argument 1 is invalid
1251 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/9/type_traits:1251:46: note: invalid template non-type parameter
/usr/include/c++/9/type_traits:1253:31: error: 'std::size_t' has not been declared
1253 | template<typename _Tp, std::size_t _Size>
| ^~~~~~
/usr/include/c++/9/type_traits:1254:21: error: '_Size' was not declared in this scope
1254 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/9/type_traits:1254:27: error: template argument 1 is invalid
1254 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/9/type_traits:1255:37: error: 'size_t' is not a member of 'std'
1255 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/include/c++/9/type_traits:1255:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/9/type_traits:1255:65: error: template argument 1 is invalid
1255 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/9/type_traits:1255:65: note: invalid template non-type parameter
/usr/include/c++/9/type_traits:1259:37: error: 'size_t' is not a member of 'std'
1259 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/include/c++/9/type_traits:1259:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/9/type_traits:1259:65: error: template argument 1 is invalid
1259 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/9/type_traits:1259:65: note: invalid template non-type parameter
/usr/include/c++/9/type_traits:1264:37: error: 'size_t' is not a member of 'std'
1264 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/include/c++/9/type_traits:1264:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/9/type_traits:1264:46: error: template argument 1 is invalid
1264 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/9/type_traits:1264:46: note: invalid template non-type parameter
/usr/include/c++/9/type_traits:1266:47: error: 'std::size_t' has not been declared
1266 | template<typename _Tp, unsigned _Uint, std::size_t _Size>
| ^~~~~~
/usr/include/c++/9/type_traits:1267:23: error: '_Size' was not declared in this scope
1267 | struct extent<_Tp[_Size], _Uint>
| ^~~~~
/usr/include/c++/9/type_traits:1267:36: error: template argument 1 is invalid
1267 | struct extent<_Tp[_Size], _Uint>
| ^
/usr/include/c++/9/type_traits:1268:37: error: 'size_t' is not a member of 'std'
1268 | : public integral_constant<std::size_t,
| ^~~~~~
/usr/include/c++/9/type_traits:1268:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/9/type_traits:1269:24: error: '_Size' was not declared in this scope
1269 | _Uint == 0 ? _Size : extent<_Tp,
| ^~~~~
/usr/include/c++/9/type_traits:1270:28: error: template argument 1 is invalid
1270 | _Uint - 1>::value>
| ^
/usr/include/c++/9/type_traits:1270:28: note: invalid template non-type parameter
/usr/include/c++/9/type_traits:1275:37: error: 'size_t' is not a member of 'std'
1275 | : public integral_constant<std::size_t,
| ^~~~~~
/usr/include/c++/9/type_traits:1275:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/9/type_traits:1277:31: error: template argument 1 is invalid
1277 | _Uint - 1>::value>
| ^
/usr/include/c++/9/type_traits:1277:31: note: invalid template non-type parameter
/usr/include/c++/9/type_traits:1610:26: error: 'size_t' does not name a type
1610 | { static constexpr size_t __size = sizeof(_Tp); };
| ^~~~~~
In file included from /usr/include/c++/9/bits/move.h:55,
from /usr/include/c++/9/bits/stl_pair.h:59,
from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/type_traits:1:1: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
+++ |+#include <cstddef>
1 | // C++11 <type_traits> -*- C++ -*-
In file included from /usr/include/c++/9/bits/move.h:55,
from /usr/include/c++/9/bits/stl_pair.h:59,
from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/type_traits:1612:14: error: 'size_t' has not been declared
1612 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| ^~~~~~
/usr/include/c++/9/type_traits:1612:48: error: '_Sz' was not declared in this scope
1612 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| ^~~
/usr/include/c++/9/type_traits:1613:14: error: no default argument for '_Tp'
1613 | struct __select;
| ^~~~~~~~
/usr/include/c++/9/type_traits:1615:14: error: 'size_t' has not been declared
1615 | template<size_t _Sz, typename _Uint, typename... _UInts>
| ^~~~~~
/usr/include/c++/9/type_traits:1616:23: error: '_Sz' was not declared in this scope
1616 | struct __select<_Sz, _List<_Uint, _UInts...>, true>
| ^~~
/usr/include/c++/9/type_traits:1616:57: error: template argument 1 is invalid
1616 | struct __select<_Sz, _List<_Uint, _UInts...>, true>
| ^
/usr/include/c++/9/type_traits:1619:14: error: 'size_t' has not been declared
1619 | template<size_t _Sz, typename _Uint, typename... _UInts>
| ^~~~~~
/usr/include/c++/9/type_traits:1620:23: error: '_Sz' was not declared in this scope
1620 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
| ^~~
/usr/include/c++/9/type_traits:1620:58: error: template argument 1 is invalid
1620 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
| ^
/usr/include/c++/9/type_traits:1621:18: error: '_Sz' was not declared in this scope
1621 | : __select<_Sz, _List<_UInts...>>
| ^~~
/usr/include/c++/9/type_traits:1621:38: error: template argument 1 is invalid
1621 | : __select<_Sz, _List<_UInts...>>
| ^~
/usr/include/c++/9/type_traits:1612:52: error: '__size' is not a member of 'std::__make_unsigned_selector_base::_List<unsigned char, short unsigned int, unsigned int, long unsigned int, long long unsigned int>'
1612 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| ~~~~~^~~~~~~~~~~~~~~
/usr/include/c++/9/type_traits:1634:68: error: template argument 3 is invalid
1634 | using __unsigned_type = typename __select<sizeof(_Tp), _UInts>::__type;
| ^
/usr/include/c++/9/type_traits:1638:40: error: '__unsigned_type' was not declared in this scope
1638 | = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/type_traits:1638:55: error: template argument 2 is invalid
1638 | = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
| ^
/usr/include/c++/9/type_traits:1650:61: error: '__type' in 'class std::__make_unsigned_selector<wchar_t, false, true>' does not name a type
1650 | = typename __make_unsigned_selector<wchar_t, false, true>::__type;
| ^~~~~~
/usr/include/c++/9/type_traits:1667:62: error: '__type' in 'class std::__make_unsigned_selector<char16_t, false, true>' does not name a type
1667 | = typename __make_unsigned_selector<char16_t, false, true>::__type;
| ^~~~~~
/usr/include/c++/9/type_traits:1674:62: error: '__type' in 'class std::__make_unsigned_selector<char32_t, false, true>' does not name a type
1674 | = typename __make_unsigned_selector<char32_t, false, true>::__type;
| ^~~~~~
/usr/include/c++/9/type_traits: In instantiation of 'class std::__make_unsigned_selector<wchar_t, true, false>':
/usr/include/c++/9/type_traits:1761:62: required from 'class std::__make_signed_selector<wchar_t, false, true>'
/usr/include/c++/9/type_traits:1776:57: required from here
/usr/include/c++/9/type_traits:1595:13: error: no type named '__type' in 'struct std::__make_unsigned<wchar_t>'
1595 | using __unsigned_type
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/type_traits:1599:13: error: no type named '__type' in 'struct std::__make_unsigned<wchar_t>'
1599 | using __type
| ^~~~~~
/usr/include/c++/9/type_traits:1776:59: error: invalid combination of multiple type-specifiers
1776 | = typename __make_signed_selector<wchar_t, false, true>::__type;
| ^~~~~~
/usr/include/c++/9/type_traits: In instantiation of 'class std::__make_unsigned_selector<char16_t, true, false>':
/usr/include/c++/9/type_traits:1761:62: required from 'class std::__make_signed_selector<char16_t, false, true>'
/usr/include/c++/9/type_traits:1793:58: required from here
/usr/include/c++/9/type_traits:1595:13: error: no type named '__type' in 'struct std::__make_unsigned<char16_t>'
1595 | using __unsigned_type
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/type_traits:1599:13: error: no type named '__type' in 'struct std::__make_unsigned<char16_t>'
1599 | using __type
| ^~~~~~
/usr/include/c++/9/type_traits:1793:60: error: invalid combination of multiple type-specifiers
1793 | = typename __make_signed_selector<char16_t, false, true>::__type;
| ^~~~~~
/usr/include/c++/9/type_traits: In instantiation of 'class std::__make_unsigned_selector<char32_t, true, false>':
/usr/include/c++/9/type_traits:1761:62: required from 'class std::__make_signed_selector<char32_t, false, true>'
/usr/include/c++/9/type_traits:1800:58: required from here
/usr/include/c++/9/type_traits:1595:13: error: no type named '__type' in 'struct std::__make_unsigned<char32_t>'
1595 | using __unsigned_type
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/type_traits:1599:13: error: no type named '__type' in 'struct std::__make_unsigned<char32_t>'
1599 | using __type
| ^~~~~~
/usr/include/c++/9/type_traits:1800:60: error: invalid combination of multiple type-specifiers
1800 | = typename __make_signed_selector<char32_t, false, true>::__type;
| ^~~~~~
/usr/include/c++/9/type_traits:1832:31: error: 'std::size_t' has not been declared
1832 | template<typename _Tp, std::size_t _Size>
| ^~~~~~
/usr/include/c++/9/type_traits:1833:30: error: '_Size' was not declared in this scope
1833 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/9/type_traits:1833:36: error: template argument 1 is invalid
1833 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/9/type_traits:1845:31: error: 'std::size_t' has not been declared
1845 | template<typename _Tp, std::size_t _Size>
| ^~~~~~
/usr/include/c++/9/type_traits:1846:35: error: '_Size' was not declared in this scope
1846 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/9/type_traits:1846:41: error: template argument 1 is invalid
1846 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/9/type_traits:1904:17: error: 'std::size_t' has not been declared
1904 | template<std::size_t _Len>
| ^~~~~~
/usr/include/c++/9/type_traits:1909:23: error: '_Len' was not declared in this scope
1909 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/9/type_traits:1924:17: error: 'std::size_t' has not been declared
1924 | template<std::size_t _Len, std::size_t _Align =
| ^~~~~~
/usr/include/c++/9/type_traits:1924:35: error: 'std::size_t' has not been declared
1924 | template<std::size_t _Len, std::size_t _Align =
| ^~~~~~
/usr/include/c++/9/type_traits:1925:48: error: '_Len' was not declared in this scope
1925 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/9/type_traits:1925:52: error: template argument 1 is invalid
1925 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/9/type_traits:1930:23: error: '_Len' was not declared in this scope
1930 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/9/type_traits:1931:37: error: '_Align' was not declared in this scope
1931 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
/usr/include/c++/9/type_traits:1938:20: error: 'size_t' does not name a type
1938 | static const size_t _S_alignment = 0;
| ^~~~~~
/usr/include/c++/9/type_traits:1938:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/9/type_traits:1939:20: error: 'size_t' does not name a type
1939 | static const size_t _S_size = 0;
| ^~~~~~
/usr/include/c++/9/type_traits:1939:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/9/type_traits:1945:20: error: 'size_t' does not name a type
1945 | static const size_t _S_alignment =
| ^~~~~~
/usr/include/c++/9/type_traits:1945:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/9/type_traits:1948:20: error: 'size_t' does not name a type
1948 | static const size_t _S_size =
| ^~~~~~
/usr/include/c++/9/type_traits:1948:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/9/type_traits:1963:13: error: 'size_t' has not been declared
1963 | template <size_t _Len, typename... _Types>
| ^~~~~~
/usr/include/c++/9/type_traits:1970:20: error: 'size_t' does not name a type
1970 | static const size_t _S_len = _Len > __strictest::_S_size
| ^~~~~~
/usr/include/c++/9/type_traits:1970:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/9/type_traits:1974:20: error: 'size_t' does not name a type
1974 | static const size_t alignment_value = __strictest::_S_alignment;
| ^~~~~~
/usr/include/c++/9/type_traits:1974:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/9/type_traits:1976:40: error: '_S_len' was not declared in this scope
1976 | typedef typename aligned_storage<_S_len, alignment_value>::type type;
| ^~~~~~
/usr/include/c++/9/type_traits:1976:48: error: 'alignment_value' was not declared in this scope; did you mean 'alignment_of'?
1976 | typedef typename aligned_storage<_S_len, alignment_value>::type type;
| ^~~~~~~~~~~~~~~
| alignment_of
/usr/include/c++/9/type_traits:1976:63: error: template argument 1 is invalid
1976 | typedef typename aligned_storage<_S_len, alignment_value>::type type;
| ^
/usr/include/c++/9/type_traits:1976:63: error: template argument 2 is invalid
/usr/include/c++/9/type_traits:1979:13: error: 'size_t' has not been declared
1979 | template <size_t _Len, typename... _Types>
| ^~~~~~
/usr/include/c++/9/type_traits:1980:11: error: 'size_t' does not name a type
1980 | const size_t aligned_union<_Len, _Types...>::alignment_value;
| ^~~~~~
/usr/include/c++/9/type_traits:1980:11: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/9/type_traits:2487:26: error: 'size_t' has not been declared
2487 | template<typename _Tp, size_t _Nm>
| ^~~~~~
/usr/include/c++/9/type_traits:2490:21: error: '_Nm' was not declared in this scope
2490 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~
/usr/include/c++/9/type_traits:2490:24: error: 'template<class _Tp, <declaration error> > typename std::enable_if<std::__is_swappable<_Tp>::value>::type std::swap' conflicts with a previous declaration
2490 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^
/usr/include/c++/9/type_traits:2483:5: note: previous declaration 'typename std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type std::swap(_Tp&, _Tp&)'
2483 | swap(_Tp&, _Tp&)
| ^~~~
/usr/include/c++/9/type_traits:2490:16: error: '__a' was not declared in this scope
2490 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~
/usr/include/c++/9/type_traits:2490:21: error: '_Nm' was not declared in this scope
2490 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~
/usr/include/c++/9/type_traits:2490:33: error: '__b' was not declared in this scope
2490 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~
/usr/include/c++/9/type_traits:2490:38: error: '_Nm' was not declared in this scope
2490 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~
/usr/include/c++/9/type_traits:2490:43: error: expected ';' before 'noexcept'
2490 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^
| ;
2491 | noexcept(__is_nothrow_swappable<_Tp>::value);
| ~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_pair.h:59,
from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/bits/move.h:201:26: error: 'size_t' has not been declared
201 | template<typename _Tp, size_t _Nm>
| ^~~~~~
/usr/include/c++/9/bits/move.h:205:21: error: '_Nm' was not declared in this scope
205 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~
/usr/include/c++/9/bits/move.h:205:24: error: 'template<class _Tp, <declaration error> > typename std::enable_if<std::__is_swappable<_Tp>::value>::type std::swap' conflicts with a previous declaration
205 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^
/usr/include/c++/9/bits/move.h:182:5: note: previous declaration 'typename std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type std::swap(_Tp&, _Tp&)'
182 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/9/bits/move.h:205:16: error: '__a' was not declared in this scope
205 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~
/usr/include/c++/9/bits/move.h:205:21: error: '_Nm' was not declared in this scope
205 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~
/usr/include/c++/9/bits/move.h:205:33: error: '__b' was not declared in this scope
205 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~
/usr/include/c++/9/bits/move.h:205:38: error: '_Nm' was not declared in this scope
205 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~
/usr/include/c++/9/bits/move.h:205:43: error: expected ';' before 'noexcept'
205 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^
| ;
206 | noexcept(__is_nothrow_swappable<_Tp>::value)
| ~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/bits/stl_pair.h:86:17: error: 'std::size_t' has not been declared
86 | template<std::size_t...>
| ^~~~~~
/usr/include/c++/9/bits/stl_pair.h:434:41: error: 'std::size_t' has not been declared
434 | template<typename... _Args1, std::size_t... _Indexes1,
| ^~~~~~
/usr/include/c++/9/bits/stl_pair.h:435:41: error: 'std::size_t' has not been declared
435 | typename... _Args2, std::size_t... _Indexes2>
| ^~~~~~
/usr/include/c++/9/bits/stl_pair.h:437:27: error: '_Indexes1' was not declared in this scope
437 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_pair.h:437:36: error: expected parameter pack before '...'
437 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^~~
/usr/include/c++/9/bits/stl_pair.h:437:39: error: template argument 1 is invalid
437 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^
/usr/include/c++/9/bits/stl_pair.h:437:55: error: '_Indexes2' was not declared in this scope
437 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_pair.h:437:64: error: expected parameter pack before '...'
437 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^~~
/usr/include/c++/9/bits/stl_pair.h:437:67: error: template argument 1 is invalid
437 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:65,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/bits/stl_iterator_base_types.h:116:67: error: 'ptrdiff_t' does not name a type
116 | template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
| ^~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:65,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/bits/stl_iterator_base_types.h:1:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
+++ |+#include <cstddef>
1 | // Types used in iterator implementation -*- C++ -*-
In file included from /usr/include/c++/9/bits/stl_algobase.h:65,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/bits/stl_iterator_base_types.h:182:15: error: 'ptrdiff_t' does not name a type
182 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_iterator_base_types.h:182:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/9/bits/stl_iterator_base_types.h:193:15: error: 'ptrdiff_t' does not name a type
193 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_iterator_base_types.h:193:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:110:5: error: 'ptrdiff_t' does not name a type
110 | ptrdiff_t
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:66:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
65 | #include <debug/assertions.h>
+++ |+#include <cstddef>
66 |
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:116:5: error: 'ptrdiff_t' does not name a type
116 | ptrdiff_t
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:116:5: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
In file included from /usr/include/c++/9/bits/stl_iterator.h:66,
from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/bits/ptr_traits.h:109:20: error: 'ptrdiff_t' was not declared in this scope
109 | = __detected_or_t<ptrdiff_t, __difference_type, _Ptr>;
| ^~~~~~~~~
/usr/include/c++/9/bits/ptr_traits.h:1:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
+++ |+#include <cstddef>
1 | // Pointer Traits -*- C++ -*-
/usr/include/c++/9/bits/ptr_traits.h:109:54: error: template argument 1 is invalid
109 | = __detected_or_t<ptrdiff_t, __difference_type, _Ptr>;
| ^
/usr/include/c++/9/bits/ptr_traits.h:135:15: error: 'ptrdiff_t' does not name a type
135 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/usr/include/c++/9/bits/ptr_traits.h:135:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
In file included from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/bits/stl_algobase.h: In static member function 'static _Tp* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(const _Tp*, const _Tp*, _Tp*)':
/usr/include/c++/9/bits/stl_algobase.h:384:10: error: 'ptrdiff_t' does not name a type
384 | const ptrdiff_t _Num = __last - __first;
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_algobase.h:72:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
71 | #include <bits/predefined_ops.h>
+++ |+#include <cstddef>
72 | #if __cplusplus >= 201103L
/usr/include/c++/9/bits/stl_algobase.h:385:8: error: '_Num' was not declared in this scope
385 | if (_Num)
| ^~~~
/usr/include/c++/9/bits/stl_algobase.h:387:22: error: '_Num' was not declared in this scope
387 | return __result + _Num;
| ^~~~
/usr/include/c++/9/bits/stl_algobase.h: In static member function 'static _Tp* std::__copy_move_backward<_IsMove, true, std::random_access_iterator_tag>::__copy_move_b(const _Tp*, const _Tp*, _Tp*)':
/usr/include/c++/9/bits/stl_algobase.h:586:10: error: 'ptrdiff_t' does not name a type
586 | const ptrdiff_t _Num = __last - __first;
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_algobase.h:586:10: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/9/bits/stl_algobase.h:587:8: error: '_Num' was not declared in this scope
587 | if (_Num)
| ^~~~
/usr/include/c++/9/bits/stl_algobase.h:589:22: error: '_Num' was not declared in this scope
589 | return __result - _Num;
| ^~~~
/usr/include/c++/9/bits/stl_algobase.h: In function 'typename __gnu_cxx::__enable_if<std::__is_byte<_Tp>::__value, void>::__type std::__fill_a(_Tp*, _Tp*, const _Tp&)':
/usr/include/c++/9/bits/stl_algobase.h:724:24: error: expected initializer before '__len'
724 | if (const size_t __len = __last - __first)
| ^~~~~
/usr/include/c++/9/bits/stl_algobase.h:724:23: error: expected ')' before '__len'
724 | if (const size_t __len = __last - __first)
| ~ ^~~~~~
| )
/usr/include/c++/9/bits/stl_algobase.h:725:63: error: '__len' was not declared in this scope
725 | __builtin_memset(__first, static_cast<unsigned char>(__tmp), __len);
| ^~~~~
/usr/include/c++/9/bits/stl_algobase.h: In static member function 'static bool std::__equal<true>::equal(const _Tp*, const _Tp*, const _Tp*)':
/usr/include/c++/9/bits/stl_algobase.h:833:21: error: expected initializer before '__len'
833 | if (const size_t __len = (__last1 - __first1))
| ^~~~~
/usr/include/c++/9/bits/stl_algobase.h:833:20: error: expected ')' before '__len'
833 | if (const size_t __len = (__last1 - __first1))
| ~ ^~~~~~
| )
/usr/include/c++/9/bits/stl_algobase.h:834:65: error: '__len' was not declared in this scope
834 | return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) * __len);
| ^~~~~
/usr/include/c++/9/bits/stl_algobase.h: In static member function 'static bool std::__lexicographical_compare<true>::__lc(const _Tp*, const _Tp*, const _Up*, const _Up*)':
/usr/include/c++/9/bits/stl_algobase.h:937:10: error: 'size_t' does not name a type
937 | const size_t __len1 = __last1 - __first1;
| ^~~~~~
/usr/include/c++/9/bits/stl_algobase.h:937:10: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/9/bits/stl_algobase.h:938:10: error: 'size_t' does not name a type
938 | const size_t __len2 = __last2 - __first2;
| ^~~~~~
/usr/include/c++/9/bits/stl_algobase.h:938:10: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/9/bits/stl_algobase.h:939:21: error: expected initializer before '__len'
939 | if (const size_t __len = std::min(__len1, __len2))
| ^~~~~
/usr/include/c++/9/bits/stl_algobase.h:939:20: error: expected ')' before '__len'
939 | if (const size_t __len = std::min(__len1, __len2))
| ~ ^~~~~~
| )
/usr/include/c++/9/bits/stl_algobase.h:940:62: error: '__len' was not declared in this scope
940 | if (int __result = __builtin_memcmp(__first1, __first2, __len))
| ^~~~~
/usr/include/c++/9/bits/stl_algobase.h:942:11: error: '__len1' was not declared in this scope
942 | return __len1 < __len2;
| ^~~~~~
/usr/include/c++/9/bits/stl_algobase.h:942:20: error: '__len2' was not declared in this scope
942 | return __len1 < __len2;
| ^~~~~~
In file included from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/include/c++/9/new: At global scope:
/usr/include/c++/9/new:125:50: error: declaration of 'operator new' as non-function
125 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^
/usr/include/c++/9/new:125:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
125 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
In file included from /usr/include/c++/9/bits/cxxabi_init_exception.h:38,
from /usr/include/c++/9/bits/exception_ptr.h:38,
from /usr/include/c++/9/exception:143,
from /usr/include/c++/9/new:40,
from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/include/c++/9/new:126:41: error: attributes after parenthesized initializer ignored [-fpermissive]
126 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/9/new:127:52: error: declaration of 'operator new []' as non-function
127 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^
/usr/include/c++/9/new:127:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
127 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
In file included from /usr/include/c++/9/bits/cxxabi_init_exception.h:38,
from /usr/include/c++/9/bits/exception_ptr.h:38,
from /usr/include/c++/9/exception:143,
from /usr/include/c++/9/new:40,
from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/include/c++/9/new:128:41: error: attributes after parenthesized initializer ignored [-fpermissive]
128 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/9/new:139:44: error: declaration of 'operator new' as non-function
139 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/include/c++/9/new:139:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
In file included from /usr/include/c++/9/bits/cxxabi_init_exception.h:38,
from /usr/include/c++/9/bits/exception_ptr.h:38,
from /usr/include/c++/9/exception:143,
from /usr/include/c++/9/new:40,
from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/include/c++/9/new:139:52: error: expected primary-expression before 'const'
139 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/9/new:141:46: error: declaration of 'operator new []' as non-function
141 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/include/c++/9/new:141:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
In file included from /usr/include/c++/9/bits/cxxabi_init_exception.h:38,
from /usr/include/c++/9/bits/exception_ptr.h:38,
from /usr/include/c++/9/exception:143,
from /usr/include/c++/9/new:40,
from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/include/c++/9/new:141:54: error: expected primary-expression before 'const'
141 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/9/new:173:51: error: declaration of 'operator new' as non-function
173 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/include/c++/9/new:173:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
In file included from /usr/include/c++/9/bits/cxxabi_init_exception.h:38,
from /usr/include/c++/9/bits/exception_ptr.h:38,
from /usr/include/c++/9/exception:143,
from /usr/include/c++/9/new:40,
from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/include/c++/9/new:173:59: error: expected primary-expression before 'void'
173 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~
/usr/include/c++/9/new:175:53: error: declaration of 'operator new []' as non-function
175 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/include/c++/9/new:175:53: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
In file included from /usr/include/c++/9/bits/cxxabi_init_exception.h:38,
from /usr/include/c++/9/bits/exception_ptr.h:38,
from /usr/include/c++/9/exception:143,
from /usr/include/c++/9/new:40,
from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/include/c++/9/new:175:61: error: expected primary-expression before 'void'
175 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/vector:64,
from foo.cc:2:
/usr/include/c++/9/ext/new_allocator.h:44:14: error: 'std::size_t' has not been declared
44 | using std::size_t;
| ^~~~~~
/usr/include/c++/9/ext/new_allocator.h:45:14: error: 'std::ptrdiff_t' has not been declared
45 | using std::ptrdiff_t;
| ^~~~~~~~~
In file included from /usr/include/c++/9/ext/alloc_traits.h:36,
from /usr/include/c++/9/bits/stl_construct.h:61,
from /usr/include/c++/9/vector:65,
from foo.cc:2:
/usr/include/c++/9/bits/alloc_traits.h:411:36: error: 'ptrdiff_t' in namespace 'std' does not name a type
411 | using difference_type = std::ptrdiff_t;
| ^~~~~~~~~
/usr/include/c++/9/bits/alloc_traits.h:414:30: error: 'size_t' in namespace 'std' does not name a type
414 | using size_type = std::size_t;
| ^~~~~~
/usr/include/c++/9/bits/alloc_traits.h:442:37: error: 'size_type' has not been declared
442 | allocate(allocator_type& __a, size_type __n)
| ^~~~~~~~~
/usr/include/c++/9/bits/alloc_traits.h:456:37: error: 'size_type' has not been declared
456 | allocate(allocator_type& __a, size_type __n, const_void_pointer __hint)
| ^~~~~~~~~
/usr/include/c++/9/bits/alloc_traits.h:468:52: error: 'size_type' has not been declared
468 | deallocate(allocator_type& __a, pointer __p, size_type __n)
| ^~~~~~~~~
/usr/include/c++/9/bits/alloc_traits.h:503:14: error: 'size_type' does not name a type; did you mean 'true_type'?
503 | static size_type
| ^~~~~~~~~
| true_type
In file included from /usr/include/c++/9/vector:68,
from foo.cc:2:
/usr/include/c++/9/bits/stl_bvector.h:143:63: error: template argument 3 is invalid
143 | : public std::iterator<std::random_access_iterator_tag, bool>
| ^
/usr/include/c++/9/bits/stl_bvector.h: In member function 'void std::_Bit_iterator_base::_M_incr(ptrdiff_t)':
/usr/include/c++/9/bits/stl_bvector.h:174:7: error: 'difference_type' was not declared in this scope
174 | difference_type __n = __i + _M_offset;
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:175:15: error: '__n' was not declared in this scope; did you mean '__i'?
175 | _M_p += __n / int(_S_word_bit);
| ^~~
| __i
/usr/include/c++/9/bits/stl_bvector.h: At global scope:
/usr/include/c++/9/bits/stl_bvector.h:270:16: error: declaration of 'operator+=' as non-function
270 | operator+=(difference_type __i)
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:270:13: error: expected ';' at end of member declaration
270 | operator+=(difference_type __i)
| ^~
| ;
/usr/include/c++/9/bits/stl_bvector.h:270:31: error: expected ')' before '__i'
270 | operator+=(difference_type __i)
| ~ ^~~~
| )
/usr/include/c++/9/bits/stl_bvector.h:277:16: error: declaration of 'operator-=' as non-function
277 | operator-=(difference_type __i)
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:277:13: error: expected ';' at end of member declaration
277 | operator-=(difference_type __i)
| ^~
| ;
/usr/include/c++/9/bits/stl_bvector.h:277:31: error: expected ')' before '__i'
277 | operator-=(difference_type __i)
| ~ ^~~~
| )
/usr/include/c++/9/bits/stl_bvector.h:284:15: error: 'difference_type' has not been declared
284 | operator+(difference_type __i) const
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:291:15: error: 'difference_type' has not been declared
291 | operator-(difference_type __i) const
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:298:16: error: 'difference_type' has not been declared
298 | operator[](difference_type __i) const
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h: In member function 'std::_Bit_iterator::iterator std::_Bit_iterator::operator+(int) const':
/usr/include/c++/9/bits/stl_bvector.h:287:20: error: no match for 'operator+=' (operand types are 'std::_Bit_iterator::iterator' {aka 'std::_Bit_iterator'} and 'int')
287 | return __tmp += __i;
| ~~~~~~^~~~~~
/usr/include/c++/9/bits/stl_bvector.h: In member function 'std::_Bit_iterator::iterator std::_Bit_iterator::operator-(int) const':
/usr/include/c++/9/bits/stl_bvector.h:294:20: error: no match for 'operator-=' (operand types are 'std::_Bit_iterator::iterator' {aka 'std::_Bit_iterator'} and 'int')
294 | return __tmp -= __i;
| ~~~~~~^~~~~~
/usr/include/c++/9/bits/stl_bvector.h: At global scope:
/usr/include/c++/9/bits/stl_bvector.h:360:16: error: declaration of 'operator+=' as non-function
360 | operator+=(difference_type __i)
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:360:13: error: expected ';' at end of member declaration
360 | operator+=(difference_type __i)
| ^~
| ;
/usr/include/c++/9/bits/stl_bvector.h:360:31: error: expected ')' before '__i'
360 | operator+=(difference_type __i)
| ~ ^~~~
| )
/usr/include/c++/9/bits/stl_bvector.h:367:16: error: declaration of 'operator-=' as non-function
367 | operator-=(difference_type __i)
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:367:13: error: expected ';' at end of member declaration
367 | operator-=(difference_type __i)
| ^~
| ;
/usr/include/c++/9/bits/stl_bvector.h:367:31: error: expected ')' before '__i'
367 | operator-=(difference_type __i)
| ~ ^~~~
| )
/usr/include/c++/9/bits/stl_bvector.h:374:15: error: 'difference_type' has not been declared
374 | operator+(difference_type __i) const
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:381:15: error: 'difference_type' has not been declared
381 | operator-(difference_type __i) const
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:388:16: error: 'difference_type' has not been declared
388 | operator[](difference_type __i) const
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h: In member function 'std::_Bit_const_iterator::const_iterator std::_Bit_const_iterator::operator+(int) const':
/usr/include/c++/9/bits/stl_bvector.h:377:20: error: no match for 'operator+=' (operand types are 'std::_Bit_const_iterator::const_iterator' {aka 'std::_Bit_const_iterator'} and 'int')
377 | return __tmp += __i;
| ~~~~~~^~~~~~
/usr/include/c++/9/bits/stl_bvector.h: In member function 'std::_Bit_const_iterator::const_iterator std::_Bit_const_iterator::operator-(int) const':
/usr/include/c++/9/bits/stl_bvector.h:384:20: error: no match for 'operator-=' (operand types are 'std::_Bit_const_iterator::const_iterator' {aka 'std::_Bit_const_iterator'} and 'int')
384 | return __tmp -= __i;
| ~~~~~~^~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/vector:60,
from foo.cc:2:
/usr/include/c++/9/bits/stl_iterator.h: In instantiation of 'class std::reverse_iterator<std::_Bit_iterator>':
/usr/include/c++/9/bits/stl_bvector.h:828:7: required from here
/usr/include/c++/9/bits/stl_iterator.h:105:11: error: no type named 'iterator_category' in 'struct std::iterator_traits<std::_Bit_iterator>'
105 | class reverse_iterator
| ^~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:119:55: error: no type named 'difference_type' in 'struct std::iterator_traits<std::_Bit_iterator>'
119 | typedef typename __traits_type::difference_type difference_type;
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:120:48: error: no type named 'pointer' in 'struct std::iterator_traits<std::_Bit_iterator>'
120 | typedef typename __traits_type::pointer pointer;
| ^~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:121:50: error: no type named 'reference' in 'struct std::iterator_traits<std::_Bit_iterator>'
121 | typedef typename __traits_type::reference reference;
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h: In instantiation of 'class std::reverse_iterator<std::_Bit_const_iterator>':
/usr/include/c++/9/bits/stl_bvector.h:832:7: required from here
/usr/include/c++/9/bits/stl_iterator.h:105:11: error: no type named 'iterator_category' in 'struct std::iterator_traits<std::_Bit_const_iterator>'
105 | class reverse_iterator
| ^~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:119:55: error: no type named 'difference_type' in 'struct std::iterator_traits<std::_Bit_const_iterator>'
119 | typedef typename __traits_type::difference_type difference_type;
| ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:120:48: error: no type named 'pointer' in 'struct std::iterator_traits<std::_Bit_const_iterator>'
120 | typedef typename __traits_type::pointer pointer;
| ^~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:121:50: error: no type named 'reference' in 'struct std::iterator_traits<std::_Bit_const_iterator>'
121 | typedef typename __traits_type::reference reference;
| ^~~~~~~~~
foo.cc: At global scope:
foo.cc:6:16: error: expected unqualified-id before numeric constant
6 | int array = 3, 9, 7, 4, 5, 2;
| ^
foo.cc:7:41: error: invalid type argument of unary '*' (have 'int')
7 | const int size = sizeof array / sizeof *array;
| ^~~~~
foo.cc:13:2: error: expected initializer before 'if'
13 | if(start == last)
| ^~
foo.cc:15:13: error: 'last' was not declared in this scope
15 | int mid = (last - start) / 2 + start;
| ^~~~
foo.cc:15:20: error: 'start' was not declared in this scope
15 | int mid = (last - start) / 2 + start;
| ^~~~~
foo.cc:15:33: error: 'start' was not declared in this scope
15 | int mid = (last - start) / 2 + start;
| ^~~~~
foo.cc:16:13: error: expected constructor, destructor, or type conversion before '(' token
16 | reversePair(numbers, start, mid, index, count);
| ^
foo.cc:17:13: error: expected constructor, destructor, or type conversion before '(' token
17 | reversePair(numbers, mid + 1, last, index, count);
| ^
foo.cc:19:2: error: expected unqualified-id before 'for'
19 | for(int i = start; i <= last; i++)
| ^~~
foo.cc:19:21: error: 'i' does not name a type
19 | for(int i = start; i <= last; i++)
| ^
foo.cc:19:32: error: 'i' does not name a type
19 | for(int i = start; i <= last; i++)
| ^
foo.cc:21:15: error: 'start' was not declared in this scope
21 | int index1 = start, index2 = mid + 1;
| ^~~~~
foo.cc:22:2: error: 'index' does not name a type; did you mean 'index1'?
22 | index = start;
| ^~~~~
| index1
foo.cc:23:2: error: expected unqualified-id before 'while'
23 | while(index1 <= mid && index2 <= last)
| ^~~~~
foo.cc:26:3: error: 'count' does not name a type
26 | count += mid - index1 + 1;
| ^~~~~
foo.cc:27:3: error: 'index' does not name a type; did you mean 'index1'?
27 | index++;
| ^~~~~
| index1
foo.cc:28:3: error: 'index2' does not name a type; did you mean 'index1'?
28 | index2++;
| ^~~~~~
| index1
foo.cc:29:3: error: expected unqualified-id before 'else'
29 | else if(tempindex1 == tempindex2)
| ^~~~
foo.cc:31:3: error: 'index' does not name a type; did you mean 'index1'?
31 | index++;
| ^~~~~
| index1
foo.cc:32:3: error: 'index1' does not name a type
32 | index1++;
| ^~~~~~
foo.cc:33:3: error: 'index2' does not name a type; did you mean 'index1'?
33 | index2++;
| ^~~~~~
| index1
foo.cc:34:3: error: expected unqualified-id before 'else'
34 | else if(tempindex1 < tempindex2)
| ^~~~
foo.cc:36:3: error: 'index' does not name a type; did you mean 'index1'?
36 | index++;
| ^~~~~
| index1
foo.cc:37:3: error: 'index1' does not name a type
37 | index1++;
| ^~~~~~
foo.cc:41:2: error: expected unqualified-id before 'if'
41 | if(index1 <= mid)
| ^~
foo.cc:44:3: error: 'index' does not name a type; did you mean 'index1'?
44 | index++;
| ^~~~~
| index1
foo.cc:45:3: error: 'index1' does not name a type
45 | index1++;
| ^~~~~~
foo.cc:47:3: error: expected unqualified-id before 'else'
47 | else
| ^~~~
foo.cc:50:3: error: 'index' does not name a type; did you mean 'index1'?
50 | index++;
| ^~~~~
| index1
foo.cc:51:3: error: 'index2' does not name a type; did you mean 'index1'?
51 | index2++;
| ^~~~~~
| index1
foo.cc:54:2: error: expected unqualified-id before 'return'
54 | return count;
| ^~~~~~
foo.cc:59:2: error: expected initializer before 'int'
59 | int count = 0;
| ^~~
foo.cc:61:13: error: expected constructor, destructor, or type conversion before '(' token
61 | reversePair(array, 0, size - 1, index, count);
| ^
foo.cc:63:2: error: 'cout' does not name a type
63 | cout << "count = " << count << endl;
| ^~~~