실행 실패 (제출 코드 컴파일 에러)
Main.cpp:1:7: error: ‘iostream’ was not declared in this scope 1 | lude <iostream> | ^~~~~~~~ Main.cpp:1:7: error: ‘iostream’ was not declared in this scope Main.cpp:1:7: error: ‘iostream’ was not declared in this scope Main.cpp:1:7: error: ‘iostream’ was not declared in this scope Main.cpp:1:7: error: ‘iostream’ was not declared in this scope Main.cpp:1:7: error: ‘iostream’ was not declared in this scope Main.cpp:1:7: error: ‘iostream’ was not declared in this scope Main.cpp:1:7: error: ‘iostream’ was not declared in this scope Main.cpp:1:7: error: ‘iostream’ was not declared in this scope Main.cpp:1:1: error: ‘lude’ does not name a type 1 | lude <iostream> | ^~~~ In file included from /usr/include/c++/11/bits/stl_algobase.h:62, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/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++/11/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++/11/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++/11/bits/move.h:57, from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/type_traits:227:27: error: ‘size_t’ has not been declared 227 | template <typename _Tp, size_t = sizeof(_Tp)> | ^~~~~~ /usr/include/c++/11/type_traits:431:26: error: ‘std::size_t’ has not been declared 431 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/11/type_traits:432:25: error: ‘_Size’ was not declared in this scope 432 | struct is_array<_Tp[_Size]> | ^~~~~ /usr/include/c++/11/type_traits:432:31: error: template argument 1 is invalid 432 | struct is_array<_Tp[_Size]> | ^ /usr/include/c++/11/type_traits:537:42: error: ‘nullptr_t’ is not a member of ‘std’ 537 | struct __is_null_pointer_helper<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/11/type_traits:537:51: error: template argument 1 is invalid 537 | struct __is_null_pointer_helper<std::nullptr_t> | ^ /usr/include/c++/11/type_traits:1361:37: error: ‘size_t’ is not a member of ‘std’ 1361 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ /usr/include/c++/11/type_traits:1361:57: error: template argument 1 is invalid 1361 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/11/type_traits:1370:37: error: ‘size_t’ is not a member of ‘std’ 1370 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/include/c++/11/type_traits:1370:46: error: template argument 1 is invalid 1370 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/11/type_traits:1372:26: error: ‘std::size_t’ has not been declared 1372 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/11/type_traits:1373:21: error: ‘_Size’ was not declared in this scope 1373 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/11/type_traits:1373:27: error: template argument 1 is invalid 1373 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/11/type_traits:1374:37: error: ‘size_t’ is not a member of ‘std’ 1374 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/11/type_traits:1374:65: error: template argument 1 is invalid 1374 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/11/type_traits:1378:37: error: ‘size_t’ is not a member of ‘std’ 1378 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/11/type_traits:1378:65: error: template argument 1 is invalid 1378 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/11/type_traits:1383:37: error: ‘size_t’ is not a member of ‘std’ 1383 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/include/c++/11/type_traits:1383:46: error: template argument 1 is invalid 1383 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/11/type_traits:1385:42: error: ‘std::size_t’ has not been declared 1385 | template<typename _Tp, unsigned _Uint, std::size_t _Size> | ^~~ /usr/include/c++/11/type_traits:1386:23: error: ‘_Size’ was not declared in this scope 1386 | struct extent<_Tp[_Size], _Uint> | ^~~~~ /usr/include/c++/11/type_traits:1386:36: error: template argument 1 is invalid 1386 | struct extent<_Tp[_Size], _Uint> | ^ /usr/include/c++/11/type_traits:1387:37: error: ‘size_t’ is not a member of ‘std’ 1387 | : public integral_constant<std::size_t, | ^~~~~~ /usr/include/c++/11/type_traits:1388:45: error: ‘_Size’ was not declared in this scope 1388 | _Uint == 0 ? _Size : extent<_Tp, | ^~~~~ /usr/include/c++/11/type_traits:1389:77: error: template argument 1 is invalid 1389 | _Uint - 1>::value> | ^ /usr/include/c++/11/type_traits:1394:37: error: ‘size_t’ is not a member of ‘std’ 1394 | : public integral_constant<std::size_t, | ^~~~~~ /usr/include/c++/11/type_traits:1396:73: error: template argument 1 is invalid 1396 | _Uint - 1>::value> | ^ /usr/include/c++/11/type_traits:1759:26: error: ‘size_t’ does not name a type 1759 | { static constexpr size_t __size = sizeof(_Tp); }; | ^~~~~~ In file included from /usr/include/c++/11/bits/move.h:57, from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/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++/11/bits/move.h:57, from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/type_traits:1761:14: error: ‘size_t’ has not been declared 1761 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~~~~ /usr/include/c++/11/type_traits:1761:48: error: ‘_Sz’ was not declared in this scope 1761 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~ /usr/include/c++/11/type_traits:1762:14: error: no default argument for ‘_Tp’ 1762 | struct __select; | ^~~~~~~~ /usr/include/c++/11/type_traits:1764:14: error: ‘size_t’ has not been declared 1764 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/11/type_traits:1765:23: error: ‘_Sz’ was not declared in this scope 1765 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^~~ /usr/include/c++/11/type_traits:1765:57: error: template argument 1 is invalid 1765 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^ /usr/include/c++/11/type_traits:1768:14: error: ‘size_t’ has not been declared 1768 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/11/type_traits:1769:23: error: ‘_Sz’ was not declared in this scope 1769 | struct __select<_Sz, _List<_Uint, _UInts...>, false> | ^~~ /usr/include/c++/11/type_traits:1769:58: error: template argument 1 is invalid 1769 | struct __select<_Sz, _List<_Uint, _UInts...>, false> | ^ /usr/include/c++/11/type_traits:1770:18: error: ‘_Sz’ was not declared in this scope 1770 | : __select<_Sz, _List<_UInts...>> | ^~~ /usr/include/c++/11/type_traits:1770:38: error: template argument 1 is invalid 1770 | : __select<_Sz, _List<_UInts...>> | ^~ /usr/include/c++/11/type_traits:1761:60: 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>’ 1761 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~~~~ /usr/include/c++/11/type_traits:1783:68: error: template argument 3 is invalid 1783 | using __unsigned_type = typename __select<sizeof(_Tp), _UInts>::__type; | ^ /usr/include/c++/11/type_traits:1787:47: error: ‘__unsigned_type’ was not declared in this scope 1787 | = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; | ^~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:1787:62: error: template argument 2 is invalid 1787 | = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; | ^ /usr/include/c++/11/type_traits:1799:68: error: ‘__type’ in ‘class std::__make_unsigned_selector<wchar_t, false, true>’ does not name a type 1799 | = typename __make_unsigned_selector<wchar_t, false, true>::__type; | ^~~~~~ /usr/include/c++/11/type_traits:1808:68: error: ‘__type’ in ‘class std::__make_unsigned_selector<char8_t, false, true>’ does not name a type 1808 | = typename __make_unsigned_selector<char8_t, false, true>::__type; | ^~~~~~ /usr/include/c++/11/type_traits:1816:69: error: ‘__type’ in ‘class std::__make_unsigned_selector<char16_t, false, true>’ does not name a type 1816 | = typename __make_unsigned_selector<char16_t, false, true>::__type; | ^~~~~~ /usr/include/c++/11/type_traits:1823:69: error: ‘__type’ in ‘class std::__make_unsigned_selector<char32_t, false, true>’ does not name a type 1823 | = typename __make_unsigned_selector<char32_t, false, true>::__type; | ^~~~~~ /usr/include/c++/11/type_traits: In instantiation of ‘class std::__make_unsigned_selector<wchar_t, true, false>’: /usr/include/c++/11/type_traits:1912:62: required from ‘class std::__make_signed_selector<wchar_t, false, true>’ /usr/include/c++/11/type_traits:1927:57: required from here /usr/include/c++/11/type_traits:1744:13: error: no type named ‘__type’ in ‘struct std::__make_unsigned<wchar_t>’ 1744 | using __unsigned_type | ^~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:1748:13: error: no type named ‘__type’ in ‘struct std::__make_unsigned<wchar_t>’ 1748 | using __type | ^~~~~~ /usr/include/c++/11/type_traits:1927:66: error: invalid combination of multiple type-specifiers 1927 | = typename __make_signed_selector<wchar_t, false, true>::__type; | ^~~~~~ /usr/include/c++/11/type_traits: In instantiation of ‘class std::__make_unsigned_selector<char8_t, true, false>’: /usr/include/c++/11/type_traits:1912:62: required from ‘class std::__make_signed_selector<char8_t, false, true>’ /usr/include/c++/11/type_traits:1936:57: required from here /usr/include/c++/11/type_traits:1744:13: error: no type named ‘__type’ in ‘struct std::__make_unsigned<char8_t>’ 1744 | using __unsigned_type | ^~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:1748:13: error: no type named ‘__type’ in ‘struct std::__make_unsigned<char8_t>’ 1748 | using __type | ^~~~~~ /usr/include/c++/11/type_traits:1936:66: error: invalid combination of multiple type-specifiers 1936 | = typename __make_signed_selector<char8_t, false, true>::__type; | ^~~~~~ /usr/include/c++/11/type_traits: In instantiation of ‘class std::__make_unsigned_selector<char16_t, true, false>’: /usr/include/c++/11/type_traits:1912:62: required from ‘class std::__make_signed_selector<char16_t, false, true>’ /usr/include/c++/11/type_traits:1944:58: required from here /usr/include/c++/11/type_traits:1744:13: error: no type named ‘__type’ in ‘struct std::__make_unsigned<char16_t>’ 1744 | using __unsigned_type | ^~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:1748:13: error: no type named ‘__type’ in ‘struct std::__make_unsigned<char16_t>’ 1748 | using __type | ^~~~~~ /usr/include/c++/11/type_traits:1944:67: error: invalid combination of multiple type-specifiers 1944 | = typename __make_signed_selector<char16_t, false, true>::__type; | ^~~~~~ /usr/include/c++/11/type_traits: In instantiation of ‘class std::__make_unsigned_selector<char32_t, true, false>’: /usr/include/c++/11/type_traits:1912:62: required from ‘class std::__make_signed_selector<char32_t, false, true>’ /usr/include/c++/11/type_traits:1951:58: required from here /usr/include/c++/11/type_traits:1744:13: error: no type named ‘__type’ in ‘struct std::__make_unsigned<char32_t>’ 1744 | using __unsigned_type | ^~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:1748:13: error: no type named ‘__type’ in ‘struct std::__make_unsigned<char32_t>’ 1748 | using __type | ^~~~~~ /usr/include/c++/11/type_traits:1951:67: error: invalid combination of multiple type-specifiers 1951 | = typename __make_signed_selector<char32_t, false, true>::__type; | ^~~~~~ /usr/include/c++/11/type_traits:1984:26: error: ‘std::size_t’ has not been declared 1984 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/11/type_traits:1985:30: error: ‘_Size’ was not declared in this scope 1985 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/11/type_traits:1985:36: error: template argument 1 is invalid 1985 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/11/type_traits:1997:26: error: ‘std::size_t’ has not been declared 1997 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/11/type_traits:1998:35: error: ‘_Size’ was not declared in this scope 1998 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/11/type_traits:1998:41: error: template argument 1 is invalid 1998 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/11/type_traits:2056:12: error: ‘std::size_t’ has not been declared 2056 | template<std::size_t _Len> | ^~~ /usr/include/c++/11/type_traits:2061:30: error: ‘_Len’ was not declared in this scope 2061 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/11/type_traits:2076:12: error: ‘std::size_t’ has not been declared 2076 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/11/type_traits:2076:30: error: ‘std::size_t’ has not been declared 2076 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/11/type_traits:2077:55: error: ‘_Len’ was not declared in this scope 2077 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/11/type_traits:2077:59: error: template argument 1 is invalid 2077 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/11/type_traits:2082:30: error: ‘_Len’ was not declared in this scope 2082 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/11/type_traits:2083:44: error: ‘_Align’ was not declared in this scope 2083 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ /usr/include/c++/11/type_traits:2090:20: error: ‘size_t’ does not name a type 2090 | static const size_t _S_alignment = 0; | ^~~~~~ /usr/include/c++/11/type_traits:2090:20: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/type_traits:2091:20: error: ‘size_t’ does not name a type 2091 | static const size_t _S_size = 0; | ^~~~~~ /usr/include/c++/11/type_traits:2091:20: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/type_traits:2097:20: error: ‘size_t’ does not name a type 2097 | static const size_t _S_alignment = | ^~~~~~ /usr/include/c++/11/type_traits:2097:20: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/type_traits:2100:20: error: ‘size_t’ does not name a type 2100 | static const size_t _S_size = | ^~~~~~ /usr/include/c++/11/type_traits:2100:20: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/type_traits:2115:13: error: ‘size_t’ has not been declared 2115 | template <size_t _Len, typename... _Types> | ^~~~~~ /usr/include/c++/11/type_traits:2122:20: error: ‘size_t’ does not name a type 2122 | static const size_t _S_len = _Len > __strictest::_S_size | ^~~~~~ /usr/include/c++/11/type_traits:2122:20: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/type_traits:2126:20: error: ‘size_t’ does not name a type 2126 | static const size_t alignment_value = __strictest::_S_alignment; | ^~~~~~ /usr/include/c++/11/type_traits:2126:20: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/type_traits:2128:40: error: ‘_S_len’ was not declared in this scope 2128 | typedef typename aligned_storage<_S_len, alignment_value>::type type; | ^~~~~~ /usr/include/c++/11/type_traits:2128:48: error: ‘alignment_value’ was not declared in this scope; did you mean ‘alignment_of’? 2128 | typedef typename aligned_storage<_S_len, alignment_value>::type type; | ^~~~~~~~~~~~~~~ | alignment_of /usr/include/c++/11/type_traits:2128:63: error: template argument 1 is invalid 2128 | typedef typename aligned_storage<_S_len, alignment_value>::type type; | ^ /usr/include/c++/11/type_traits:2128:63: error: template argument 2 is invalid /usr/include/c++/11/type_traits:2131:13: error: ‘size_t’ has not been declared 2131 | template <size_t _Len, typename... _Types> | ^~~~~~ /usr/include/c++/11/type_traits:2132:11: error: ‘size_t’ does not name a type 2132 | const size_t aligned_union<_Len, _Types...>::alignment_value; | ^~~~~~ /usr/include/c++/11/type_traits:2132:11: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/type_traits:2566:12: error: ‘size_t’ has not been declared 2566 | template<size_t _Len, size_t _Align = | ^~~~~~ /usr/include/c++/11/type_traits:2566:25: error: ‘size_t’ has not been declared 2566 | template<size_t _Len, size_t _Align = | ^~~~~~ /usr/include/c++/11/type_traits:2567:56: error: ‘_Len’ was not declared in this scope 2567 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/11/type_traits:2567:60: error: template argument 1 is invalid 2567 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/11/type_traits:2568:56: error: ‘_Len’ was not declared in this scope 2568 | using aligned_storage_t = typename aligned_storage<_Len, _Align>::type; | ^~~~ /usr/include/c++/11/type_traits:2568:62: error: ‘_Align’ was not declared in this scope 2568 | using aligned_storage_t = typename aligned_storage<_Len, _Align>::type; | ^~~~~~ /usr/include/c++/11/type_traits:2568:68: error: template argument 1 is invalid 2568 | using aligned_storage_t = typename aligned_storage<_Len, _Align>::type; | ^ /usr/include/c++/11/type_traits:2568:68: error: template argument 2 is invalid /usr/include/c++/11/type_traits:2570:13: error: ‘size_t’ has not been declared 2570 | template <size_t _Len, typename... _Types> | ^~~~~~ /usr/include/c++/11/type_traits:2571:52: error: ‘_Len’ was not declared in this scope 2571 | using aligned_union_t = typename aligned_union<_Len, _Types...>::type; | ^~~~ /usr/include/c++/11/type_traits:2571:67: error: template argument 1 is invalid 2571 | using aligned_union_t = typename aligned_union<_Len, _Types...>::type; | ^ /usr/include/c++/11/type_traits:2680:26: error: ‘size_t’ has not been declared 2680 | template<typename _Tp, size_t _Nm> | ^~~~~~ /usr/include/c++/11/type_traits:2684:21: error: ‘_Nm’ was not declared in this scope 2684 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~ /usr/include/c++/11/type_traits:2684:24: error: ‘template<class _Tp, <declaration error> > constexpr std::__enable_if_t<std::__is_swappable<_Tp>::value> std::swap’ conflicts with a previous declaration 2684 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^ /usr/include/c++/11/type_traits:2676:5: note: previous declaration ‘constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&)’ 2676 | swap(_Tp&, _Tp&) | ^~~~ /usr/include/c++/11/type_traits:2684:16: error: ‘__a’ was not declared in this scope 2684 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~ /usr/include/c++/11/type_traits:2684:21: error: ‘_Nm’ was not declared in this scope 2684 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~ /usr/include/c++/11/type_traits:2684:33: error: ‘__b’ was not declared in this scope 2684 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~ /usr/include/c++/11/type_traits:2684:38: error: ‘_Nm’ was not declared in this scope 2684 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~ /usr/include/c++/11/type_traits:2684:43: error: expected ‘;’ before ‘noexcept’ 2684 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^ | ; 2685 | noexcept(__is_nothrow_swappable<_Tp>::value); | ~~~~~~~~ /usr/include/c++/11/type_traits:3244:20: error: ‘size_t’ does not name a type 3244 | inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value; | ^~~~~~ /usr/include/c++/11/type_traits:3244:20: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/type_traits:3246:20: error: ‘size_t’ does not name a type 3246 | inline constexpr size_t rank_v = rank<_Tp>::value; | ^~~~~~ /usr/include/c++/11/type_traits:3246:20: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/type_traits:3248:20: error: ‘size_t’ does not name a type 3248 | inline constexpr size_t extent_v = extent<_Tp, _Idx>::value; | ^~~~~~ /usr/include/c++/11/type_traits:3248:20: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? In file included from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/move.h:212:26: error: ‘size_t’ has not been declared 212 | template<typename _Tp, size_t _Nm> | ^~~~~~ /usr/include/c++/11/bits/move.h:220:21: error: ‘_Nm’ was not declared in this scope 220 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~ /usr/include/c++/11/bits/move.h:220:24: error: ‘template<class _Tp, <declaration error> > constexpr const typename std::enable_if<std::__is_swappable<_Tp>::value, void>::type std::swap’ conflicts with a previous declaration 220 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^ /usr/include/c++/11/bits/move.h:196:5: note: previous declaration ‘constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&)’ 196 | swap(_Tp& __a, _Tp& __b) | ^~~~ /usr/include/c++/11/bits/move.h:220:16: error: ‘__a’ was not declared in this scope 220 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~ /usr/include/c++/11/bits/move.h:220:21: error: ‘_Nm’ was not declared in this scope 220 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~ /usr/include/c++/11/bits/move.h:220:33: error: ‘__b’ was not declared in this scope 220 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~ /usr/include/c++/11/bits/move.h:220:38: error: ‘_Nm’ was not declared in this scope 220 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~ /usr/include/c++/11/bits/move.h:220:43: error: expected ‘;’ before ‘noexcept’ 220 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^ | ; In file included from /usr/include/c++/11/compare:39, from /usr/include/c++/11/bits/stl_pair.h:65, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/concepts:211:46: error: ‘size_t’ has not been declared 211 | template<typename _Tp, typename _Up, size_t _Num> | ^~~~~~ /usr/include/c++/11/concepts:216:34: error: ‘_Num’ was not declared in this scope 216 | operator()(_Tp (&__e1)[_Num], _Up (&__e2)[_Num]) const | ^~~~ /usr/include/c++/11/concepts:216:39: error: expected ‘)’ before ‘,’ token 216 | operator()(_Tp (&__e1)[_Num], _Up (&__e2)[_Num]) const | ~ ^ | ) /usr/include/c++/11/concepts:216:39: error: expected ‘;’ before ‘,’ token 216 | operator()(_Tp (&__e1)[_Num], _Up (&__e2)[_Num]) const | ^ | ; In file included from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/stl_pair.h:92:12: error: ‘size_t’ has not been declared 92 | template<size_t...> | ^~~~~~ /usr/include/c++/11/bits/stl_pair.h:449:36: error: ‘size_t’ has not been declared 449 | template<typename... _Args1, size_t... _Indexes1, | ^~~~~~ /usr/include/c++/11/bits/stl_pair.h:450:36: error: ‘size_t’ has not been declared 450 | typename... _Args2, size_t... _Indexes2> | ^~~~~~ /usr/include/c++/11/bits/stl_pair.h:453:27: error: ‘_Indexes1’ was not declared in this scope 453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); | ^~~~~~~~~ /usr/include/c++/11/bits/stl_pair.h:453:36: error: expected parameter pack before ‘...’ 453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); | ^~~ /usr/include/c++/11/bits/stl_pair.h:453:39: error: template argument 1 is invalid 453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); | ^ /usr/include/c++/11/bits/stl_pair.h:453:55: error: ‘_Indexes2’ was not declared in this scope 453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); | ^~~~~~~~~ /usr/include/c++/11/bits/stl_pair.h:453:64: error: expected parameter pack before ‘...’ 453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); | ^~~ /usr/include/c++/11/bits/stl_pair.h:453:67: error: template argument 1 is invalid 453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); | ^ In file included from /usr/include/c++/11/bits/iterator_concepts.h:36, from /usr/include/c++/11/bits/stl_iterator_base_types.h:71, from /usr/include/c++/11/bits/stl_algobase.h:65, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/ptr_traits.h:119:27: error: ‘ptrdiff_t’ was not declared in this scope 119 | = __detected_or_t<ptrdiff_t, __difference_type, _Ptr>; | ^~~~~~~~~ /usr/include/c++/11/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++/11/bits/ptr_traits.h:119:61: error: template argument 1 is invalid 119 | = __detected_or_t<ptrdiff_t, __difference_type, _Ptr>; | ^ /usr/include/c++/11/bits/ptr_traits.h:138:15: error: ‘ptrdiff_t’ does not name a type 138 | typedef ptrdiff_t difference_type; | ^~~~~~~~~ /usr/include/c++/11/bits/ptr_traits.h:138:15: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? In file included from /usr/include/c++/11/bits/stl_iterator_base_types.h:71, from /usr/include/c++/11/bits/stl_algobase.h:65, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/iterator_concepts.h:153:31: error: ‘ptrdiff_t’ does not name a type 153 | { using difference_type = ptrdiff_t; }; | ^~~~~~~~~ /usr/include/c++/11/bits/iterator_concepts.h:38:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? 37 | #include <bits/ranges_cmp.h> // identity, ranges::less +++ |+#include <cstddef> 38 | In file included from /usr/include/c++/11/bits/stl_algobase.h:65, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/stl_iterator_base_types.h:125:67: error: ‘ptrdiff_t’ does not name a type 125 | template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, | ^~~~~~~~~ /usr/include/c++/11/bits/stl_iterator_base_types.h:72:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? 71 | # include <bits/iterator_concepts.h> +++ |+#include <cstddef> 72 | #endif /usr/include/c++/11/bits/stl_iterator_base_types.h:203:33: error: ‘ptrdiff_t’ does not name a type 203 | using difference_type = ptrdiff_t; | ^~~~~~~~~ /usr/include/c++/11/bits/stl_iterator_base_types.h:203:33: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? In file included from /usr/include/c++/11/bits/stl_algobase.h:66, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/stl_iterator_base_funcs.h:110:5: error: ‘ptrdiff_t’ does not name a type 110 | ptrdiff_t | ^~~~~~~~~ /usr/include/c++/11/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++/11/bits/stl_iterator_base_funcs.h:116:5: error: ‘ptrdiff_t’ does not name a type 116 | ptrdiff_t | ^~~~~~~~~ /usr/include/c++/11/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++/11/bits/stl_iterator.h:82, from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/new:89:25: error: found ‘:’ in nested-name-specifier, expected ‘::’ 89 | enum class align_val_t: size_t {}; | ^ | :: /usr/include/c++/11/new:89:27: error: ‘size_t’ in ‘enum class std::align_val_t’ does not name a type 89 | enum class align_val_t: size_t {}; | ^~~~~~ /usr/include/c++/11/new:89:34: error: expected unqualified-id before ‘{’ token 89 | enum class align_val_t: size_t {}; | ^ /usr/include/c++/11/new:126:26: error: declaration of ‘operator new’ as non-function 126 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/11/new:126:44: error: ‘size_t’ is not a member of ‘std’ 126 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/include/c++/11/new:127:41: error: attributes after parenthesized initializer ignored [-fpermissive] 127 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/11/new:128:26: error: declaration of ‘operator new []’ as non-function 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/11/new:128:46: error: ‘size_t’ is not a member of ‘std’ 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/include/c++/11/new:129:41: error: attributes after parenthesized initializer ignored [-fpermissive] 129 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/11/new:135:29: error: ‘std::size_t’ has not been declared 135 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/11/new:137:31: error: ‘std::size_t’ has not been declared 137 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/11/new:140:26: error: declaration of ‘operator new’ as non-function 140 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/11/new:140:44: error: ‘size_t’ is not a member of ‘std’ 140 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/include/c++/11/new:140:52: error: expected primary-expression before ‘const’ 140 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/11/new:142:26: error: declaration of ‘operator new []’ as non-function 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/11/new:142:46: error: ‘size_t’ is not a member of ‘std’ 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/include/c++/11/new:142:54: error: expected primary-expression before ‘const’ 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/11/new:149:26: error: declaration of ‘operator new’ as non-function 149 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/11/new:149:44: error: ‘size_t’ is not a member of ‘std’ 149 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/include/c++/11/new:149:68: error: expected primary-expression before ‘)’ token 149 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/11/new:150:73: error: attributes after parenthesized initializer ignored [-fpermissive] 150 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/11/new:151:26: error: declaration of ‘operator new’ as non-function 151 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/11/new:151:44: error: ‘size_t’ is not a member of ‘std’ 151 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/include/c++/11/new:151:68: error: expected primary-expression before ‘,’ token 151 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/11/new:151:70: error: expected primary-expression before ‘const’ 151 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/11/new:157:26: error: declaration of ‘operator new []’ as non-function 157 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/11/new:157:46: error: ‘size_t’ is not a member of ‘std’ 157 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/include/c++/11/new:157:70: error: expected primary-expression before ‘)’ token 157 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/11/new:158:73: error: attributes after parenthesized initializer ignored [-fpermissive] 158 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/11/new:159:26: error: declaration of ‘operator new []’ as non-function 159 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/11/new:159:46: error: ‘size_t’ is not a member of ‘std’ 159 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/include/c++/11/new:159:70: error: expected primary-expression before ‘,’ token 159 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/11/new:159:72: error: expected primary-expression before ‘const’ 159 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/11/new:166:29: error: ‘std::size_t’ has not been declared 166 | void operator delete(void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/11/new:168:31: error: ‘std::size_t’ has not been declared 168 | void operator delete[](void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/11/new:174:33: error: declaration of ‘operator new’ as non-function 174 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/11/new:174:51: error: ‘size_t’ is not a member of ‘std’ 174 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/include/c++/11/new:174:59: error: expected primary-expression before ‘void’ 174 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~ /usr/include/c++/11/new:176:33: error: declaration of ‘operator new []’ as non-function 176 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/11/new:176:53: error: ‘size_t’ is not a member of ‘std’ 176 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/include/c++/11/new:176:61: error: expected primary-expression before ‘void’ 176 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/stl_iterator.h:658:31: error: ‘ptrdiff_t’ does not name a type 658 | using difference_type = ptrdiff_t; | ^~~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:86:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? 85 | # include <bits/stl_construct.h> +++ |+#include <cstddef> 86 | #endif /usr/include/c++/11/bits/stl_iterator.h:761:31: error: ‘ptrdiff_t’ does not name a type 761 | using difference_type = ptrdiff_t; | ^~~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:761:31: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/bits/stl_iterator.h:880:31: error: ‘ptrdiff_t’ does not name a type 880 | using difference_type = ptrdiff_t; | ^~~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:880:31: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? In file included from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/stl_algobase.h:90:56: error: ‘size_t’ has not been declared 90 | __memcmp(const _Tp* __first1, const _Up* __first2, size_t __num) | ^~~~~~ /usr/include/c++/11/bits/stl_algobase.h: In static member function ‘static constexpr _Tp* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(const _Tp*, const _Tp*, _Tp*)’: /usr/include/c++/11/bits/stl_algobase.h:429:17: error: ‘ptrdiff_t’ does not name a type 429 | const ptrdiff_t _Num = __last - __first; | ^~~~~~~~~ /usr/include/c++/11/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++/11/bits/stl_algobase.h:430:15: error: ‘_Num’ was not declared in this scope 430 | if (_Num) | ^~~~ /usr/include/c++/11/bits/stl_algobase.h:432:29: error: ‘_Num’ was not declared in this scope 432 | return __result + _Num; | ^~~~ /usr/include/c++/11/bits/stl_algobase.h: In static member function ‘static constexpr _Tp* std::__copy_move_backward<_IsMove, true, std::random_access_iterator_tag>::__copy_move_b(const _Tp*, const _Tp*, _Tp*)’: /usr/include/c++/11/bits/stl_algobase.h:740:17: error: ‘ptrdiff_t’ does not name a type 740 | const ptrdiff_t _Num = __last - __first; | ^~~~~~~~~ /usr/include/c++/11/bits/stl_algobase.h:740:17: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/bits/stl_algobase.h:741:15: error: ‘_Num’ was not declared in this scope 741 | if (_Num) | ^~~~ /usr/include/c++/11/bits/stl_algobase.h:743:29: error: ‘_Num’ was not declared in this scope 743 | return __result - _Num; | ^~~~ /usr/include/c++/11/bits/stl_algobase.h: In function ‘constexpr typename __gnu_cxx::__enable_if<std::__is_byte<_Tp>::__value, void>::__type std::__fill_a1(_Tp*, _Tp*, const _Tp&)’: /usr/include/c++/11/bits/stl_algobase.h:943:24: error: expected initializer before ‘__len’ 943 | if (const size_t __len = __last - __first) | ^~~~~ /usr/include/c++/11/bits/stl_algobase.h:943:23: error: expected ‘)’ before ‘__len’ 943 | if (const size_t __len = __last - __first) | ~ ^~~~~~ | ) /usr/include/c++/11/bits/stl_algobase.h:944:70: error: ‘__len’ was not declared in this scope 944 | __builtin_memset(__first, static_cast<unsigned char>(__tmp), __len); | ^~~~~ /usr/include/c++/11/bits/stl_algobase.h: In static member function ‘static constexpr bool std::__equal<true>::equal(const _Tp*, const _Tp*, const _Tp*)’: /usr/include/c++/11/bits/stl_algobase.h:1176:28: error: expected initializer before ‘__len’ 1176 | if (const size_t __len = (__last1 - __first1)) | ^~~~~ /usr/include/c++/11/bits/stl_algobase.h:1176:28: error: expected ‘)’ before ‘__len’ /usr/include/c++/11/bits/stl_algobase.h:1176:14: note: to match this ‘(’ 1176 | if (const size_t __len = (__last1 - __first1)) | ^ /usr/include/c++/11/bits/stl_algobase.h:1177:55: error: ‘__len’ was not declared in this scope 1177 | return !std::__memcmp(__first1, __first2, __len); | ^~~~~ /usr/include/c++/11/bits/stl_algobase.h: At global scope: /usr/include/c++/11/bits/stl_algobase.h:1349:16: error: ‘ptrdiff_t’ does not name a type 1349 | static ptrdiff_t | ^~~~~~~~~ /usr/include/c++/11/bits/stl_algobase.h:1349:16: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? In file included from /usr/include/c++/11/bits/stl_algo.h:62, from /usr/include/c++/11/deque:62, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/stl_tempbuf.h:99:16: error: ‘ptrdiff_t’ was not declared in this scope 99 | pair<_Tp*, ptrdiff_t> | ^~~~~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:1:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? +++ |+#include <cstddef> 1 | // Temporary buffer implementation -*- C++ -*- /usr/include/c++/11/bits/stl_tempbuf.h:99:25: error: template argument 2 is invalid 99 | pair<_Tp*, ptrdiff_t> | ^ /usr/include/c++/11/bits/stl_tempbuf.h:100:26: error: ‘ptrdiff_t’ was not declared in this scope 100 | get_temporary_buffer(ptrdiff_t __len) _GLIBCXX_NOEXCEPT | ^~~~~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:100:26: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/bits/stl_tempbuf.h:100:42: error: expected ‘;’ before ‘noexcept’ 100 | get_temporary_buffer(ptrdiff_t __len) _GLIBCXX_NOEXCEPT | ^ | ; /usr/include/c++/11/bits/stl_tempbuf.h:145:15: error: ‘ptrdiff_t’ does not name a type 145 | typedef ptrdiff_t size_type; | ^~~~~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:145:15: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/bits/stl_tempbuf.h:148:7: error: ‘size_type’ does not name a type; did you mean ‘true_type’? 148 | size_type _M_original_len; | ^~~~~~~~~ | true_type /usr/include/c++/11/bits/stl_tempbuf.h:149:7: error: ‘size_type’ does not name a type; did you mean ‘true_type’? 149 | size_type _M_len; | ^~~~~~~~~ | true_type /usr/include/c++/11/bits/stl_tempbuf.h:154:7: error: ‘size_type’ does not name a type; did you mean ‘true_type’? 154 | size_type | ^~~~~~~~~ | true_type /usr/include/c++/11/bits/stl_tempbuf.h:159:7: error: ‘size_type’ does not name a type; did you mean ‘true_type’? 159 | size_type | ^~~~~~~~~ | true_type /usr/include/c++/11/bits/stl_tempbuf.h:177:50: error: ‘size_type’ has not been declared 177 | _Temporary_buffer(_ForwardIterator __seed, size_type __original_len); | ^~~~~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h: In member function ‘std::_Temporary_buffer<_ForwardIterator, _Tp>::value_type* std::_Temporary_buffer<_ForwardIterator, _Tp>::end()’: /usr/include/c++/11/bits/stl_tempbuf.h:171:28: error: ‘_M_len’ was not declared in this scope 171 | { return _M_buffer + _M_len; } | ^~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h: In destructor ‘std::_Temporary_buffer<_ForwardIterator, _Tp>::~_Temporary_buffer()’: /usr/include/c++/11/bits/stl_tempbuf.h:181:46: error: ‘_M_len’ was not declared in this scope 181 | std::_Destroy(_M_buffer, _M_buffer + _M_len); | ^~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h: At global scope: /usr/include/c++/11/bits/stl_tempbuf.h:258:48: error: ‘size_type’ has not been declared 258 | _Temporary_buffer(_ForwardIterator __seed, size_type __original_len) | ^~~~~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h: In constructor ‘std::_Temporary_buffer<_ForwardIterator, _Tp>::_Temporary_buffer(_ForwardIterator, int)’: /usr/include/c++/11/bits/stl_tempbuf.h:259:7: error: class ‘std::_Temporary_buffer<_ForwardIterator, _Tp>’ does not have any field named ‘_M_original_len’ 259 | : _M_original_len(__original_len), _M_len(0), _M_buffer(0) | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:259:40: error: class ‘std::_Temporary_buffer<_ForwardIterator, _Tp>’ does not have any field named ‘_M_len’ 259 | : _M_original_len(__original_len), _M_len(0), _M_buffer(0) | ^~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:261:26: error: ‘size_type’ was not declared in this scope; did you mean ‘true_type’? 261 | std::pair<pointer, size_type> __p( | ^~~~~~~~~ | true_type /usr/include/c++/11/bits/stl_tempbuf.h:261:35: error: template argument 2 is invalid 261 | std::pair<pointer, size_type> __p( | ^ /usr/include/c++/11/bits/stl_tempbuf.h:262:55: error: ‘_M_original_len’ was not declared in this scope; did you mean ‘__original_len’? 262 | std::get_temporary_buffer<value_type>(_M_original_len)); | ^~~~~~~~~~~~~~~ | __original_len /usr/include/c++/11/bits/stl_tempbuf.h:264:15: error: request for member ‘first’ in ‘__p’, which is of non-class type ‘int’ 264 | if (__p.first) | ^~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:268:54: error: request for member ‘first’ in ‘__p’, which is of non-class type ‘int’ 268 | std::__uninitialized_construct_buf(__p.first, __p.first + __p.second, | ^~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:268:65: error: request for member ‘first’ in ‘__p’, which is of non-class type ‘int’ 268 | std::__uninitialized_construct_buf(__p.first, __p.first + __p.second, | ^~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:268:77: error: request for member ‘second’ in ‘__p’, which is of non-class type ‘int’ 268 | std::__uninitialized_construct_buf(__p.first, __p.first + __p.second, | ^~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:270:31: error: request for member ‘first’ in ‘__p’, which is of non-class type ‘int’ 270 | _M_buffer = __p.first; | ^~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:271:15: error: ‘_M_len’ was not declared in this scope 271 | _M_len = __p.second; | ^~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:271:28: error: request for member ‘second’ in ‘__p’, which is of non-class type ‘int’ 271 | _M_len = __p.second; | ^~~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:275:60: error: request for member ‘first’ in ‘__p’, which is of non-class type ‘int’ 275 | std::__detail::__return_temporary_buffer(__p.first, __p.second); | ^~~~~ /usr/include/c++/11/bits/stl_tempbuf.h:275:71: error: request for member ‘second’ in ‘__p’, which is of non-class type ‘int’ 275 | std::__detail::__return_temporary_buffer(__p.first, __p.second); | ^~~~~~ In file included from /usr/include/aarch64-linux-gnu/c++/11/bits/c++allocator.h:33, from /usr/include/c++/11/bits/allocator.h:46, from /usr/include/c++/11/deque:64, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/ext/new_allocator.h: At global scope: /usr/include/c++/11/ext/new_allocator.h:59:20: error: ‘size_t’ in namespace ‘std’ does not name a type 59 | typedef std::size_t size_type; | ^~~~~~ /usr/include/c++/11/ext/new_allocator.h:60:20: error: ‘ptrdiff_t’ in namespace ‘std’ does not name a type 60 | typedef std::ptrdiff_t difference_type; | ^~~~~~~~~ /usr/include/c++/11/ext/new_allocator.h:103:16: error: ‘size_type’ has not been declared 103 | allocate(size_type __n, const void* = static_cast<const void*>(0)) | ^~~~~~~~~ /usr/include/c++/11/ext/new_allocator.h:132:28: error: ‘size_type’ has not been declared 132 | deallocate(_Tp* __p, size_type __t __attribute__ ((__unused__))) | ^~~~~~~~~ /usr/include/c++/11/ext/new_allocator.h:196:26: error: ‘size_type’ does not name a type; did you mean ‘size_t’? 196 | _GLIBCXX_CONSTEXPR size_type | ^~~~~~~~~ | size_t /usr/include/c++/11/ext/new_allocator.h: In member function ‘_Tp* __gnu_cxx::new_allocator<_Tp>::allocate(int, const void*)’: /usr/include/c++/11/ext/new_allocator.h:115:29: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’? 115 | if (__n > (std::size_t(-1) / sizeof(_Tp))) | ^~~~~~ In file included from /usr/include/stdlib.h:32, from /usr/include/c++/11/cstdlib:75, from /usr/include/c++/11/bits/stl_algo.h:59, from /usr/include/c++/11/deque:62, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/lib/gcc/aarch64-linux-gnu/11/include/stddef.h:209:23: note: ‘size_t’ declared here 209 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ In file included from /usr/include/c++/11/deque:64, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/allocator.h: At global scope: /usr/include/c++/11/bits/allocator.h:77:15: error: ‘ptrdiff_t’ does not name a type 77 | typedef ptrdiff_t difference_type; | ^~~~~~~~~ /usr/include/c++/11/bits/allocator.h:48:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? 47 | #include <bits/memoryfwd.h> +++ |+#include <cstddef> 48 | #if __cplusplus >= 201103L /usr/include/c++/11/bits/allocator.h:129:15: error: ‘ptrdiff_t’ does not name a type 129 | typedef ptrdiff_t difference_type; | ^~~~~~~~~ /usr/include/c++/11/bits/allocator.h:129:15: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? In file included from /usr/include/c++/11/ext/alloc_traits.h:34, from /usr/include/c++/11/bits/stl_uninitialized.h:64, from /usr/include/c++/11/deque:66, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/alloc_traits.h:432:36: error: ‘ptrdiff_t’ in namespace ‘std’ does not name a type 432 | using difference_type = std::ptrdiff_t; | ^~~~~~~~~ /usr/include/c++/11/bits/alloc_traits.h:435:30: error: ‘size_t’ in namespace ‘std’ does not name a type 435 | using size_type = std::size_t; | ^~~~~~ /usr/include/c++/11/bits/alloc_traits.h:463:37: error: ‘size_type’ has not been declared 463 | allocate(allocator_type& __a, size_type __n) | ^~~~~~~~~ /usr/include/c++/11/bits/alloc_traits.h:477:37: error: ‘size_type’ has not been declared 477 | allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) | ^~~~~~~~~ /usr/include/c++/11/bits/alloc_traits.h:495:52: error: ‘size_type’ has not been declared 495 | deallocate(allocator_type& __a, pointer __p, size_type __n) | ^~~~~~~~~ /usr/include/c++/11/bits/alloc_traits.h:546:35: error: ‘size_type’ does not name a type; did you mean ‘true_type’? 546 | static _GLIBCXX20_CONSTEXPR size_type | ^~~~~~~~~ | true_type /usr/include/c++/11/bits/alloc_traits.h:589:36: error: ‘ptrdiff_t’ in namespace ‘std’ does not name a type 589 | using difference_type = std::ptrdiff_t; | ^~~~~~~~~ /usr/include/c++/11/bits/alloc_traits.h:592:30: error: ‘size_t’ in namespace ‘std’ does not name a type 592 | using size_type = std::size_t; | ^~~~~~ /usr/include/c++/11/bits/alloc_traits.h:614:33: error: ‘size_type’ has not been declared 614 | allocate(allocator_type&, size_type, const void* = nullptr) = delete; | ^~~~~~~~~ /usr/include/c++/11/bits/alloc_traits.h:618:42: error: ‘size_type’ has not been declared 618 | deallocate(allocator_type&, void*, size_type) = delete; | ^~~~~~~~~ /usr/include/c++/11/bits/alloc_traits.h:651:14: error: ‘size_type’ does not name a type; did you mean ‘true_type’? 651 | static size_type | ^~~~~~~~~ | true_type In file included from /usr/include/c++/11/deque:66, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/stl_uninitialized.h: In function ‘std::__enable_if_t<std::__is_bitwise_relocatable<_Tp>::value, _Tp*> std::__relocate_a_1(_Tp*, _Tp*, _Tp*, std::allocator<_T2>&)’: /usr/include/c++/11/bits/stl_uninitialized.h:1009:7: error: ‘ptrdiff_t’ was not declared in this scope 1009 | ptrdiff_t __count = __last - __first; | ^~~~~~~~~ /usr/include/c++/11/bits/stl_uninitialized.h:65:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? 64 | #include <ext/alloc_traits.h> // __alloc_traits +++ |+#include <cstddef> 65 | /usr/include/c++/11/bits/stl_uninitialized.h:1010:11: error: ‘__count’ was not declared in this scope; did you mean ‘count’? 1010 | if (__count > 0) | ^~~~~~~ | count /usr/include/c++/11/bits/stl_uninitialized.h:1012:25: error: ‘__count’ was not declared in this scope; did you mean ‘count’? 1012 | return __result + __count; | ^~~~~~~ | count In file included from /usr/include/c++/11/deque:67, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/stl_deque.h: At global scope: /usr/include/c++/11/bits/stl_deque.h:139:15: error: ‘ptrdiff_t’ does not name a type 139 | typedef ptrdiff_t difference_type; | ^~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:1:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? +++ |+#include <cstddef> 1 | // Deque implementation -*- C++ -*- /usr/include/c++/11/bits/stl_deque.h:228:18: error: ‘difference_type’ has not been declared 228 | operator+=(difference_type __n) _GLIBCXX_NOEXCEPT | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:247:18: error: ‘difference_type’ has not been declared 247 | operator-=(difference_type __n) _GLIBCXX_NOEXCEPT | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:251:18: error: ‘difference_type’ has not been declared 251 | operator[](difference_type __n) const _GLIBCXX_NOEXCEPT | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:352:14: error: ‘difference_type’ does not name a type 352 | friend difference_type | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:366:16: error: ‘difference_type’ does not name a type 366 | friend difference_type | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:378:35: error: ‘difference_type’ has not been declared 378 | operator+(const _Self& __x, difference_type __n) _GLIBCXX_NOEXCEPT | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:386:35: error: ‘difference_type’ has not been declared 386 | operator-(const _Self& __x, difference_type __n) _GLIBCXX_NOEXCEPT | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:394:17: error: ‘difference_type’ has not been declared 394 | operator+(difference_type __n, const _Self& __x) _GLIBCXX_NOEXCEPT | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h: In member function ‘std::_Deque_iterator<_Tp, _Ref, _Ptr>::_Self& std::_Deque_iterator<_Tp, _Ref, _Ptr>::operator+=(int)’: /usr/include/c++/11/bits/stl_deque.h:230:15: error: ‘difference_type’ does not name a type 230 | const difference_type __offset = __n + (_M_cur - _M_first); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:231:13: error: ‘__offset’ was not declared in this scope; did you mean ‘__off_t’? 231 | if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) | ^~~~~~~~ | __off_t /usr/include/c++/11/bits/stl_deque.h:231:41: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 231 | if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:231:41: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) /usr/include/c++/11/bits/stl_deque.h:235:19: error: ‘difference_type’ does not name a type 235 | const difference_type __node_offset = | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:239:35: error: ‘__node_offset’ was not declared in this scope 239 | _M_set_node(_M_node + __node_offset); | ^~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:241:36: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 241 | * difference_type(_S_buffer_size())); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h: In member function ‘void std::_Deque_iterator<_Tp, _Ref, _Ptr>::_M_set_node(std::_Deque_iterator<_Tp, _Ref, _Ptr>::_Map_pointer)’: /usr/include/c++/11/bits/stl_deque.h:264:30: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 264 | _M_last = _M_first + difference_type(_S_buffer_size()); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h: At global scope: /usr/include/c++/11/bits/stl_deque.h:803:15: error: ‘ptrdiff_t’ does not name a type 803 | typedef ptrdiff_t difference_type; | ^~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:803:15: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/bits/stl_deque.h: In member function ‘void std::deque<_Tp, _Alloc>::resize(std::deque<_Tp, _Alloc>::size_type)’: /usr/include/c++/11/bits/stl_deque.h:1259:29: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 1259 | + difference_type(__new_size)); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h: In member function ‘void std::deque<_Tp, _Alloc>::resize(std::deque<_Tp, _Alloc>::size_type, const value_type&)’: /usr/include/c++/11/bits/stl_deque.h:1296:29: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 1296 | + difference_type(__new_size)); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h: In member function ‘std::deque<_Tp, _Alloc>::reference std::deque<_Tp, _Alloc>::operator[](std::deque<_Tp, _Alloc>::size_type)’: /usr/include/c++/11/bits/stl_deque.h:1330:39: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 1330 | return this->_M_impl._M_start[difference_type(__n)]; | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h: In member function ‘std::deque<_Tp, _Alloc>::const_reference std::deque<_Tp, _Alloc>::operator[](std::deque<_Tp, _Alloc>::size_type) const’: /usr/include/c++/11/bits/stl_deque.h:1348:39: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 1348 | return this->_M_impl._M_start[difference_type(__n)]; | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h: In member function ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::insert(std::deque<_Tp, _Alloc>::const_iterator, std::deque<_Tp, _Alloc>::size_type, const value_type&)’: /usr/include/c++/11/bits/stl_deque.h:1654:9: error: ‘difference_type’ was not declared in this scope 1654 | difference_type __offset = __position - cbegin(); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:1656:26: error: ‘__offset’ was not declared in this scope; did you mean ‘__off_t’? 1656 | return begin() + __offset; | ^~~~~~~~ | __off_t /usr/include/c++/11/bits/stl_deque.h: In member function ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::insert(std::deque<_Tp, _Alloc>::const_iterator, _InputIterator, _InputIterator)’: /usr/include/c++/11/bits/stl_deque.h:1691:11: error: ‘difference_type’ was not declared in this scope 1691 | difference_type __offset = __position - cbegin(); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:1694:28: error: ‘__offset’ was not declared in this scope; did you mean ‘__off_t’? 1694 | return begin() + __offset; | ^~~~~~~~ | __off_t /usr/include/c++/11/bits/stl_deque.h: In static member function ‘static std::deque<_Tp, _Alloc>::size_type std::deque<_Tp, _Alloc>::_S_max_size(const _Tp_alloc_type&)’: /usr/include/c++/11/bits/stl_deque.h:1836:62: error: ‘ptrdiff_t’ was not declared in this scope 1836 | const size_t __diffmax = __gnu_cxx::__numeric_traits<ptrdiff_t>::__max; | ^~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h:1836:62: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/bits/stl_deque.h:1836:71: error: template argument 1 is invalid 1836 | const size_t __diffmax = __gnu_cxx::__numeric_traits<ptrdiff_t>::__max; | ^ /usr/include/c++/11/bits/stl_deque.h: In member function ‘void std::deque<_Tp, _Alloc>::_M_fill_assign(std::deque<_Tp, _Alloc>::size_type, const value_type&)’: /usr/include/c++/11/bits/stl_deque.h:1942:39: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 1942 | _M_erase_at_end(begin() + difference_type(__n)); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h: In member function ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::_M_reserve_elements_at_front(std::deque<_Tp, _Alloc>::size_type)’: /usr/include/c++/11/bits/stl_deque.h:2096:41: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 2096 | return this->_M_impl._M_start - difference_type(__n); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_deque.h: In member function ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::_M_reserve_elements_at_back(std::deque<_Tp, _Alloc>::size_type)’: /usr/include/c++/11/bits/stl_deque.h:2106:42: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 2106 | return this->_M_impl._M_finish + difference_type(__n); | ^~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/deque:68, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/range_access.h: At global scope: /usr/include/c++/11/bits/range_access.h:328:22: error: ‘ptrdiff_t’ was not declared in this scope 328 | -> common_type_t<ptrdiff_t, make_signed_t<decltype(__cont.size())>> | ^~~~~~~~~ In file included from /usr/include/c++/11/deque:68, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/range_access.h:1:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? +++ |+#include <cstddef> 1 | // Range access functions for containers -*- C++ -*- In file included from /usr/include/c++/11/deque:68, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/range_access.h:328:70: error: template argument 1 is invalid 328 | -> common_type_t<ptrdiff_t, make_signed_t<decltype(__cont.size())>> | ^~ /usr/include/c++/11/bits/range_access.h:334:26: error: ‘ptrdiff_t’ has not been declared 334 | template<typename _Tp, ptrdiff_t _Num> | ^~~~~~~~~ /usr/include/c++/11/bits/range_access.h:335:15: error: ‘ptrdiff_t’ does not name a type 335 | constexpr ptrdiff_t | ^~~~~~~~~ /usr/include/c++/11/bits/range_access.h:335:15: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? In file included from /usr/include/c++/11/deque:69, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/bits/deque.tcc: In member function ‘std::deque<_Tp, _Alloc>& std::deque<_Tp, _Alloc>::operator=(const std::deque<_Tp, _Alloc>&)’: /usr/include/c++/11/bits/deque.tcc:123:52: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 123 | const_iterator __mid = __x.begin() + difference_type(__len); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc: In member function ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::_M_erase(std::deque<_Tp, _Alloc>::iterator)’: /usr/include/c++/11/bits/deque.tcc:240:13: error: ‘difference_type’ does not name a type 240 | const difference_type __index = __position - begin(); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:241:34: error: ‘__index’ was not declared in this scope 241 | if (static_cast<size_type>(__index) < (size() >> 1)) | ^~~~~~~ /usr/include/c++/11/bits/deque.tcc:253:24: error: ‘__index’ was not declared in this scope 253 | return begin() + __index; | ^~~~~~~ /usr/include/c++/11/bits/deque.tcc: In member function ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::_M_erase(std::deque<_Tp, _Alloc>::iterator, std::deque<_Tp, _Alloc>::iterator)’: /usr/include/c++/11/bits/deque.tcc:270:17: error: ‘difference_type’ does not name a type 270 | const difference_type __n = __last - __first; | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:271:17: error: ‘difference_type’ does not name a type 271 | const difference_type __elems_before = __first - begin(); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:272:38: error: ‘__elems_before’ was not declared in this scope 272 | if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2) | ^~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:272:67: error: ‘__n’ was not declared in this scope 272 | if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2) | ^~~ /usr/include/c++/11/bits/deque.tcc:284:28: error: ‘__elems_before’ was not declared in this scope 284 | return begin() + __elems_before; | ^~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc: In member function ‘bool std::deque<_Tp, _Alloc>::_M_shrink_to_fit()’: /usr/include/c++/11/bits/deque.tcc:377:13: error: ‘difference_type’ does not name a type 377 | const difference_type __front_capacity | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:379:11: error: ‘__front_capacity’ was not declared in this scope 379 | if (__front_capacity == 0) | ^~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:382:13: error: ‘difference_type’ does not name a type 382 | const difference_type __back_capacity | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:384:11: error: ‘__front_capacity’ was not declared in this scope 384 | if (__front_capacity + __back_capacity < _S_buffer_size()) | ^~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:384:30: error: ‘__back_capacity’ was not declared in this scope 384 | if (__front_capacity + __back_capacity < _S_buffer_size()) | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc: In member function ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::_M_insert_aux(std::deque<_Tp, _Alloc>::iterator, _Args&& ...)’: /usr/include/c++/11/bits/deque.tcc:656:9: error: ‘difference_type’ was not declared in this scope 656 | difference_type __index = __pos - this->_M_impl._M_start; | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:657:36: error: ‘__index’ was not declared in this scope 657 | if (static_cast<size_type>(__index) < size() / 2) | ^~~~~~~ /usr/include/c++/11/bits/deque.tcc: In member function ‘void std::deque<_Tp, _Alloc>::_M_insert_aux(std::deque<_Tp, _Alloc>::iterator, std::deque<_Tp, _Alloc>::size_type, const value_type&)’: /usr/include/c++/11/bits/deque.tcc:688:13: error: ‘difference_type’ does not name a type 688 | const difference_type __elems_before = __pos - this->_M_impl._M_start; | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:691:28: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 691 | if (__elems_before < difference_type(__length / 2)) | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:691:28: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] /usr/include/c++/11/bits/deque.tcc:691:28: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] /usr/include/c++/11/bits/deque.tcc:691:28: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] /usr/include/c++/11/bits/deque.tcc:691:28: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] /usr/include/c++/11/bits/deque.tcc:691:28: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] /usr/include/c++/11/bits/deque.tcc:691:28: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] /usr/include/c++/11/bits/deque.tcc:691:28: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] /usr/include/c++/11/bits/deque.tcc:691:28: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] /usr/include/c++/11/bits/deque.tcc:691:11: error: ‘__elems_before’ was not declared in this scope 691 | if (__elems_before < difference_type(__length / 2)) | ^~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:691:28: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 691 | if (__elems_before < difference_type(__length / 2)) | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:698:37: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 698 | if (__elems_before >= difference_type(__n)) | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:701:43: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 701 | + difference_type(__n)); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:707:37: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 707 | std::fill(__pos - difference_type(__n), __pos, __x_copy); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:731:17: error: ‘difference_type’ does not name a type 731 | const difference_type __elems_after = | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:733:45: error: ‘__elems_after’ was not declared in this scope 733 | __pos = this->_M_impl._M_finish - __elems_after; | ^~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:736:35: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 736 | if (__elems_after > difference_type(__n)) | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:739:44: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 739 | - difference_type(__n)); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:746:44: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 746 | std::fill(__pos, __pos + difference_type(__n), __x_copy); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:751:58: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 751 | __pos + difference_type(__n), | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc: In member function ‘void std::deque<_Tp, _Alloc>::_M_insert_aux(std::deque<_Tp, _Alloc>::iterator, _ForwardIterator, _ForwardIterator, std::deque<_Tp, _Alloc>::size_type)’: /usr/include/c++/11/bits/deque.tcc:776:15: error: ‘difference_type’ does not name a type 776 | const difference_type __elemsbefore = __pos - this->_M_impl._M_start; | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:778:36: error: ‘__elemsbefore’ was not declared in this scope 778 | if (static_cast<size_type>(__elemsbefore) < __length / 2) | ^~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:785:38: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 785 | if (__elemsbefore >= difference_type(__n)) | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:788:45: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 788 | + difference_type(__n)); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:794:56: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 794 | std::copy(__first, __last, __pos - difference_type(__n)); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:799:41: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 799 | std::advance(__mid, difference_type(__n) - __elemsbefore); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:819:17: error: ‘difference_type’ does not name a type 819 | const difference_type __elemsafter = | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:821:45: error: ‘__elemsafter’ was not declared in this scope 821 | __pos = this->_M_impl._M_finish - __elemsafter; | ^~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:824:34: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 824 | if (__elemsafter > difference_type(__n)) | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:827:44: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive] 827 | - difference_type(__n)); | ^~~~~~~~~~~~~~~ /usr/include/c++/11/bits/deque.tcc: In function ‘typename __gnu_cxx::__enable_if<std::__is_char<_CharT>::__value, std::_Deque_iterator<_CharT, _CharT&, _CharT*> >::__type std::__copy_move_a2(std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >, std::_Deque_iterator<_CharT, _CharT&, _CharT*>)’: /usr/include/c++/11/bits/deque.tcc:1085:22: error: ‘ptrdiff_t’ in namespace ‘std’ does not name a type 1085 | const std::ptrdiff_t __len = __result._M_last - __result._M_cur; | ^~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:1086:22: error: ‘ptrdiff_t’ in namespace ‘std’ does not name a type 1086 | const std::ptrdiff_t __nb | ^~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:1089:23: error: ‘__nb’ was not declared in this scope 1089 | __result += __nb; | ^~~~ /usr/include/c++/11/bits/deque.tcc:1091:23: error: ‘__len’ was not declared in this scope 1091 | if (__nb != __len) | ^~~~~ /usr/include/c++/11/bits/deque.tcc: In function ‘int std::__lex_cmp_dit(std::_Deque_iterator<_Tp, _Ref, _Ptr>, std::_Deque_iterator<_Tp, _Ref, _Ptr>, const _Tp2*, const _Tp2*)’: /usr/include/c++/11/bits/deque.tcc:1289:17: error: ‘ptrdiff_t’ does not name a type 1289 | const ptrdiff_t __len1 = __first1._M_last - __first1._M_cur; | ^~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:1:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? +++ |+#include <cstddef> 1 | // Deque implementation (out of line) -*- C++ -*- /usr/include/c++/11/bits/deque.tcc:1290:17: error: ‘ptrdiff_t’ does not name a type 1290 | const ptrdiff_t __len2 = __last2 - __first2; | ^~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:1290:17: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/bits/deque.tcc:1291:17: error: ‘ptrdiff_t’ does not name a type 1291 | const ptrdiff_t __len = std::min(__len1, __len2); | ^~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:1291:17: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/bits/deque.tcc:1294:60: error: ‘__len’ was not declared in this scope 1294 | __first2, __first2 + __len)) | ^~~~~ /usr/include/c++/11/bits/deque.tcc:1297:23: error: ‘__len’ was not declared in this scope 1297 | __first1 += __len; | ^~~~~ /usr/include/c++/11/bits/deque.tcc: In function ‘bool std::__lexicographical_compare_aux1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, std::_Deque_iterator<_Tp, _Ref, _Ptr>, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>)’: /usr/include/c++/11/bits/deque.tcc:1346:17: error: ‘ptrdiff_t’ does not name a type 1346 | const ptrdiff_t __len2 = __first2._M_node == __last2._M_node | ^~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:1346:17: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/bits/deque.tcc:1349:15: error: ‘__len2’ was not declared in this scope 1349 | if (__len2 == 0) | ^~~~~~ /usr/include/c++/11/bits/deque.tcc:1351:17: error: ‘ptrdiff_t’ does not name a type 1351 | const ptrdiff_t __len1 = __first1._M_node == __last1._M_node | ^~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:1351:17: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/bits/deque.tcc:1354:17: error: ‘ptrdiff_t’ does not name a type 1354 | const ptrdiff_t __len = std::min(__len1, __len2); | ^~~~~~~~~ /usr/include/c++/11/bits/deque.tcc:1354:17: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’? /usr/include/c++/11/bits/deque.tcc:1355:74: error: ‘__len’ was not declared in this scope 1355 | if (int __ret = _Lc::__3way(__first1._M_cur, __first1._M_cur + __len, | ^~~~~ /usr/include/c++/11/bits/deque.tcc:1359:23: error: ‘__len’ was not declared in this scope 1359 | __first1 += __len; | ^~~~~ In file included from /usr/include/c++/11/bits/stl_uninitialized.h:64, from /usr/include/c++/11/deque:66, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/ext/alloc_traits.h: In instantiation of ‘struct __gnu_cxx::__alloc_traits<std::allocator<char>, char>’: /usr/include/c++/11/bits/stl_deque.h:413:21: required from ‘class std::_Deque_base<char, std::allocator<char> >’ /usr/include/c++/11/bits/stl_deque.h:767:11: required from ‘class std::deque<char, std::allocator<char> >’ /usr/include/c++/11/bits/stl_stack.h:134:67: required from ‘class std::stack<char>’ Main.cpp:6:14: required from here /usr/include/c++/11/ext/alloc_traits.h:59:53: error: no type named ‘size_type’ in ‘struct std::allocator_traits<std::allocator<char> >’ 59 | typedef typename _Base_type::size_type size_type; | ^~~~~~~~~ /usr/include/c++/11/ext/alloc_traits.h:60:53: error: no type named ‘difference_type’ in ‘struct std::allocator_traits<std::allocator<char> >’ 60 | typedef typename _Base_type::difference_type difference_type; | ^~~~~~~~~~~~~~~ /usr/include/c++/11/ext/alloc_traits.h:68:23: error: ‘max_size’ has not been declared in ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::_Base_type’ 68 | using _Base_type::max_size; | ^~~~~~~~ In file included from /usr/include/c++/11/bits/move.h:57, from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/type_traits: In instantiation of ‘struct std::is_default_constructible<std::deque<char, std::allocator<char> > >’: /usr/include/c++/11/bits/stl_stack.h:160:43: required by substitution of ‘template<class _Seq, class _Requires> std::stack<char>::stack() [with _Seq = std::deque<char, std::allocator<char> >; _Requires = <missing>]’ Main.cpp:6:14: required from here /usr/include/c++/11/type_traits:964:52: error: static assertion failed: template argument must be a complete class or an unbounded array 964 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:964:52: note: ‘std::__is_complete_or_unbounded<std::__type_identity<std::deque<char, std::allocator<char> > > >((std::__type_identity<std::deque<char, std::allocator<char> > >{}, std::__type_identity<std::deque<char, std::allocator<char> > >()))’ evaluates to false Main.cpp: In function ‘int main()’: Main.cpp:8:9: error: ‘cin’ was not declared in this scope 8 | cin >> num; | ^~~ Main.cpp:3:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? 2 | #include <stack> +++ |+#include <iostream> 3 | using namespace std; Main.cpp:10:17: error: ‘string’ was not declared in this scope 10 | string str; | ^~~~~~ Main.cpp:3:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’? 2 | #include <stack> +++ |+#include <string> 3 | using namespace std; Main.cpp:11:24: error: ‘str’ was not declared in this scope; did you mean ‘std’? 11 | cin >> str; | ^~~ | std Main.cpp:30:25: error: ‘cout’ was not declared in this scope 30 | cout << "YES\n"; | ^~~~ Main.cpp:30:25: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? Main.cpp:33:25: error: ‘cout’ was not declared in this scope 33 | cout << "NO\n"; | ^~~~ Main.cpp:33:25: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? In file included from /usr/include/c++/11/bits/move.h:57, from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/type_traits: In instantiation of ‘struct std::is_nothrow_default_constructible<std::allocator<char> >’: /usr/include/c++/11/bits/stl_deque.h:524:16: required from ‘std::_Deque_base<_Tp, _Alloc>::_Deque_impl::_Deque_impl() [with _Tp = char; _Alloc = std::allocator<char>]’ /usr/include/c++/11/bits/stl_deque.h:438:9: required from ‘std::_Deque_base<_Tp, _Alloc>::_Deque_base() [with _Tp = char; _Alloc = std::allocator<char>]’ /usr/include/c++/11/bits/stl_deque.h:834:7: required from ‘std::stack<_Tp, _Sequence>::stack() [with _Seq = std::deque<char, std::allocator<char> >; _Requires = void; _Tp = char; _Sequence = std::deque<char, std::allocator<char> >]’ Main.cpp:6:14: required from here /usr/include/c++/11/type_traits:1034:52: error: static assertion failed: template argument must be a complete class or an unbounded array 1034 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:1034:52: note: ‘std::__is_complete_or_unbounded<std::__type_identity<std::allocator<char> > >((std::__type_identity<std::allocator<char> >{}, std::__type_identity<std::allocator<char> >()))’ evaluates to false /usr/include/c++/11/type_traits: In instantiation of ‘struct std::is_nothrow_destructible<char>’: /usr/include/c++/11/bits/alloc_traits.h:532:41: required from ‘static constexpr void std::allocator_traits<std::allocator<_Up> >::destroy(std::allocator_traits<std::allocator<_Up> >::allocator_type&, _Up*) [with _Up = char; _Tp = char; std::allocator_traits<std::allocator<_Up> >::allocator_type = std::allocator<char>]’ /usr/include/c++/11/bits/stl_deque.h:1562:28: required from ‘void std::deque<_Tp, _Alloc>::pop_back() [with _Tp = char; _Alloc = std::allocator<char>]’ /usr/include/c++/11/bits/stl_stack.h:275:12: required from ‘void std::stack<_Tp, _Sequence>::pop() [with _Tp = char; _Sequence = std::deque<char, std::allocator<char> >]’ Main.cpp:25:12: required from here /usr/include/c++/11/type_traits:939:52: error: static assertion failed: template argument must be a complete class or an unbounded array 939 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:939:52: note: ‘std::__is_complete_or_unbounded<std::__type_identity<char> >((std::__type_identity<char>{}, std::__type_identity<char>()))’ evaluates to false In file included from /usr/include/c++/11/bits/stl_uninitialized.h:64, from /usr/include/c++/11/deque:66, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/ext/alloc_traits.h: In instantiation of ‘struct __gnu_cxx::__alloc_traits<std::allocator<char*>, char*>’: /usr/include/c++/11/bits/stl_deque.h:583:31: required from ‘void std::_Deque_base<_Tp, _Alloc>::_M_deallocate_map(std::_Deque_base<_Tp, _Alloc>::_Map_pointer, size_t) [with _Tp = char; _Alloc = std::allocator<char>; std::_Deque_base<_Tp, _Alloc>::_Map_pointer = char**; size_t = long unsigned int]’ /usr/include/c++/11/bits/stl_deque.h:603:4: required from ‘std::_Deque_base<_Tp, _Alloc>::~_Deque_base() [with _Tp = char; _Alloc = std::allocator<char>]’ /usr/include/c++/11/bits/stl_deque.h:834:7: required from ‘std::stack<_Tp, _Sequence>::stack() [with _Seq = std::deque<char, std::allocator<char> >; _Requires = void; _Tp = char; _Sequence = std::deque<char, std::allocator<char> >]’ Main.cpp:6:14: required from here /usr/include/c++/11/ext/alloc_traits.h:59:53: error: no type named ‘size_type’ in ‘struct std::allocator_traits<std::allocator<char*> >’ 59 | typedef typename _Base_type::size_type size_type; | ^~~~~~~~~ /usr/include/c++/11/ext/alloc_traits.h:60:53: error: no type named ‘difference_type’ in ‘struct std::allocator_traits<std::allocator<char*> >’ 60 | typedef typename _Base_type::difference_type difference_type; | ^~~~~~~~~~~~~~~ /usr/include/c++/11/ext/alloc_traits.h:68:23: error: ‘max_size’ has not been declared in ‘__gnu_cxx::__alloc_traits<std::allocator<char*>, char*>::_Base_type’ 68 | using _Base_type::max_size; | ^~~~~~~~ In file included from /usr/include/c++/11/bits/move.h:57, from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/stack:60, from Main.cpp:2: /usr/include/c++/11/type_traits: In instantiation of ‘struct std::is_destructible<char>’: /usr/include/c++/11/bits/stl_construct.h:188:51: required from ‘constexpr void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = char*]’ /usr/include/c++/11/bits/alloc_traits.h:848:15: required from ‘void std::_Destroy(_ForwardIterator, _ForwardIterator, std::allocator<_T2>&) [with _ForwardIterator = char*; _Tp = char]’ /usr/include/c++/11/bits/deque.tcc:864:16: required from ‘void std::deque<_Tp, _Alloc>::_M_destroy_data_aux(std::deque<_Tp, _Alloc>::iterator, std::deque<_Tp, _Alloc>::iterator) [with _Tp = char; _Alloc = std::allocator<char>; std::deque<_Tp, _Alloc>::iterator = std::_Deque_base<char, std::allocator<char> >::iterator]’ /usr/include/c++/11/bits/stl_deque.h:2049:4: required from ‘void std::deque<_Tp, _Alloc>::_M_destroy_data(std::deque<_Tp, _Alloc>::iterator, std::deque<_Tp, _Alloc>::iterator, const std::allocator<_Up>&) [with _Tp = char; _Alloc = std::allocator<char>; std::deque<_Tp, _Alloc>::iterator = std::_Deque_base<char, std::allocator<char> >::iterator]’ /usr/include/c++/11/bits/stl_deque.h:1007:24: required from ‘std::deque<_Tp, _Alloc>::~deque() [with _Tp = char; _Alloc = std::allocator<char>]’ /usr/include/c++/11/bits/stl_stack.h:99:11: required from here /usr/include/c++/11/type_traits:885:52: error: static assertion failed: template argument must be a complete class or an unbounded array 885 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:885:52: note: ‘std::__is_complete_or_unbounded<std::__type_identity<char> >((std::__type_identity<char>{}, std::__type_identity<char>()))’ evaluates to false
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.