foo.cc:6:2: error: stray ‘#’ in program
6 | }#include <iostream>
| ^
foo.cc:6:3: error: ‘include’ does not name a type
6 | }#include <iostream>
| ^~~~~~~
In file included from /nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:42,
from /nix/gcc/include/c++/14.2.1.20250322/string:42,
from foo.cc:7:
/nix/gcc/include/c++/14.2.1.20250322/bits/postypes.h:68:11: error: ‘ptrdiff_t’ does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/postypes.h:41:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:50:
/nix/gcc/include/c++/14.2.1.20250322/type_traits:666:33: error: ‘nullptr_t’ is not a member of ‘std’
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:666:33: error: ‘nullptr_t’ is not a member of ‘std’
/nix/gcc/include/c++/14.2.1.20250322/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1429:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
In file included from /nix/glibc-2.40-66-dev/include/stdio.h:34,
from foo.cc:1:
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1429:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1429:57: note: invalid template non-type parameter
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1438:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1438:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1438:46: note: invalid template non-type parameter
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1440:31: error: ‘std::size_t’ has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1441:21: error: ‘_Size’ was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1442:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1442:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1442:65: note: invalid template non-type parameter
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1446:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1446:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:1446:65: note: invalid template non-type parameter
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2086:31: error: ‘std::size_t’ has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2087:30: error: ‘_Size’ was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2099:31: error: ‘std::size_t’ has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2100:35: error: ‘_Size’ was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2171:17: error: ‘std::size_t’ has not been declared
2171 | template<std::size_t _Len>
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2176:30: error: ‘_Len’ was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2194:17: error: ‘std::size_t’ has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2194:35: error: ‘std::size_t’ has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2195:55: error: ‘_Len’ was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2202:30: error: ‘_Len’ was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/nix/gcc/include/c++/14.2.1.20250322/type_traits:2203:44: error: ‘_Align’ was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:144:66: error: ‘std::size_t’ has not been declared
144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:146:40: error: ‘size_t’ in namespace ‘std’ does not name a type
146 | static _GLIBCXX14_CONSTEXPR std::size_t
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:150:39: error: ‘std::size_t’ has not been declared
150 | find(const char_type* __s, std::size_t __n, const char_type& __a);
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:153:57: error: ‘std::size_t’ has not been declared
153 | move(char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:156:57: error: ‘std::size_t’ has not been declared
156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:159:35: error: ‘std::size_t’ has not been declared
159 | assign(char_type* __s, std::size_t __n, char_type __a);
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:187:64: error: ‘std::size_t’ has not been declared
187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h: In static member function ‘static int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:189:17: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
189 | for (std::size_t __i = 0; __i < __n; ++__i)
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:189:33: error: ‘__i’ was not declared in this scope; did you mean ‘__n’?
189 | for (std::size_t __i = 0; __i < __n; ++__i)
| ^~~
| __n
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h: At global scope:
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:198:31: error: ‘size_t’ in namespace ‘std’ does not name a type
198 | _GLIBCXX14_CONSTEXPR std::size_t
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:211:37: error: ‘std::size_t’ has not been declared
211 | find(const char_type* __s, std::size_t __n, const char_type& __a)
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h: In static member function ‘static const __gnu_cxx::char_traits<_CharT>::char_type* __gnu_cxx::char_traits<_CharT>::find(const char_type*, int, const char_type&)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:213:17: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
213 | for (std::size_t __i = 0; __i < __n; ++__i)
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:213:33: error: ‘__i’ was not declared in this scope; did you mean ‘__s’?
213 | for (std::size_t __i = 0; __i < __n; ++__i)
| ^~~
| __s
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h: At global scope:
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:223:55: error: ‘std::size_t’ has not been declared
223 | move(char_type* __s1, const char_type* __s2, std::size_t __n)
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:254:55: error: ‘std::size_t’ has not been declared
254 | copy(char_type* __s1, const char_type* __s2, std::size_t __n)
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:274:33: error: ‘std::size_t’ has not been declared
274 | assign(char_type* __s, std::size_t __n, char_type __a)
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h: In static member function ‘static __gnu_cxx::char_traits<_CharT>::char_type* __gnu_cxx::char_traits<_CharT>::assign(char_type*, int, char_type)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:296:21: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
296 | for (std::size_t __i = 0; __i < __n; ++__i)
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/char_traits.h:296:37: error: ‘__i’ was not declared in this scope; did you mean ‘__s’?
296 | for (std::size_t __i = 0; __i < __n; ++__i)
| ^~~
| __s
In file included from /nix/gcc/include/c++/14.2.1.20250322/bits/new_allocator.h:34,
from /nix/gcc/include/c++/14.2.1.20250322/x86_64-unknown-linux-gnu/bits/c++allocator.h:33,
from /nix/gcc/include/c++/14.2.1.20250322/bits/allocator.h:46,
from /nix/gcc/include/c++/14.2.1.20250322/string:43:
/nix/gcc/include/c++/14.2.1.20250322/new: At global scope:
/nix/gcc/include/c++/14.2.1.20250322/new:131:26: error: declaration of ‘operator new’ as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:131:44: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/nix/gcc/include/c++/14.2.1.20250322/new:133:26: error: declaration of ‘operator new []’ as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:133:46: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| ^
/nix/gcc/include/c++/14.2.1.20250322/new:145:26: error: declaration of ‘operator new’ as non-function
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:145:44: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:145:52: error: expected primary-expression before ‘const’
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:147:26: error: declaration of ‘operator new []’ as non-function
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:147:46: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:147:54: error: expected primary-expression before ‘const’
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:179:33: error: declaration of ‘operator new’ as non-function
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:179:51: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:179:59: error: expected primary-expression before ‘void’
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~
/nix/gcc/include/c++/14.2.1.20250322/new:181:33: error: declaration of ‘operator new []’ as non-function
181 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:181:53: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
181 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/new:181:61: error: expected primary-expression before ‘void’
181 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/new_allocator.h:67:20: error: ‘size_t’ in namespace ‘std’ does not name a type
67 | typedef std::size_t size_type;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/new_allocator.h:68:20: error: ‘ptrdiff_t’ in namespace ‘std’ does not name a type
68 | typedef std::ptrdiff_t difference_type;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/new_allocator.h:126:16: error: ‘size_type’ has not been declared
126 | allocate(size_type __n, const void* = static_cast<const void*>(0))
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/new_allocator.h:156:28: error: ‘size_type’ has not been declared
156 | deallocate(_Tp* __p, size_type __n __attribute__ ((__unused__)))
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/new_allocator.h:181:7: error: ‘size_type’ does not name a type; did you mean ‘true_type’?
181 | size_type
| ^~~~~~~~~
| true_type
/nix/gcc/include/c++/14.2.1.20250322/bits/new_allocator.h:229:26: error: ‘size_type’ does not name a type; did you mean ‘true_type’?
229 | _GLIBCXX_CONSTEXPR size_type
| ^~~~~~~~~
| true_type
/nix/gcc/include/c++/14.2.1.20250322/bits/new_allocator.h: In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(int, const void*)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/new_allocator.h:138:29: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
138 | if (__n > (std::size_t(-1) / sizeof(_Tp)))
| ^~~~~~
/nix/gcc/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/include/stddef.h:214:23: note: ‘size_t’ declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/allocator.h: At global scope:
/nix/gcc/include/c++/14.2.1.20250322/bits/allocator.h:78:15: error: ‘ptrdiff_t’ does not name a type
78 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/allocator.h:47:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
46 | #include <bits/c++allocator.h> // Define the base class to std::allocator.
+++ |+#include <cstddef>
47 | #include <bits/memoryfwd.h>
/nix/gcc/include/c++/14.2.1.20250322/bits/allocator.h:133:15: error: ‘ptrdiff_t’ does not name a type
133 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/allocator.h:133:15: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
In file included from /nix/gcc/include/c++/14.2.1.20250322/string:46:
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h:48:40: error: ‘streamsize’ has not been declared
48 | const _CharT* __s, streamsize __n)
| ^~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h: In function ‘void std::__ostream_write(basic_ostream<_CharT, _Traits>&, const _CharT*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h:53:13: error: ‘streamsize’ does not name a type
53 | const streamsize __put = __out.rdbuf()->sputn(__s, __n);
| ^~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h:54:11: error: ‘__put’ was not declared in this scope; did you mean ‘__out’?
54 | if (__put != __n)
| ^~~~~
| __out
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h: At global scope:
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h:60:59: error: ‘streamsize’ has not been declared
60 | __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n)
| ^~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h:80:41: error: ‘streamsize’ has not been declared
80 | const _CharT* __s, streamsize __n)
| ^~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h: In function ‘std::basic_ostream<_CharT, _Traits>& std::__ostream_insert(basic_ostream<_CharT, _Traits>&, const _CharT*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h:90:21: error: ‘streamsize’ does not name a type
90 | const streamsize __w = __out.width();
| ^~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h:91:19: error: ‘__w’ was not declared in this scope; did you mean ‘__s’?
91 | if (__w > __n)
| ^~~
| __s
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h: At global scope:
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h:121:68: error: ‘streamsize’ has not been declared
121 | extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
| ^~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/ostream_insert.h:125:46: error: ‘streamsize’ has not been declared
125 | streamsize);
| ^~~~~~~~~~
In file included from /nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator_base_funcs.h:66,
from /nix/gcc/include/c++/14.2.1.20250322/string:47:
/nix/gcc/include/c++/14.2.1.20250322/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,
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator_base_types.h:1:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
+++ |+#include <cstddef>
1 | // Types used in iterator implementation -*- C++ -*-
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator_base_types.h:214:15: error: ‘ptrdiff_t’ does not name a type
214 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator_base_types.h:214:15: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator_base_types.h:225:15: error: ‘ptrdiff_t’ does not name a type
225 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator_base_types.h:225:15: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator_base_funcs.h:112:5: error: ‘ptrdiff_t’ does not name a type
112 | ptrdiff_t
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator_base_funcs.h:67:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
66 | #include <bits/stl_iterator_base_types.h>
+++ |+#include <cstddef>
67 |
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator_base_funcs.h:118:5: error: ‘ptrdiff_t’ does not name a type
118 | ptrdiff_t
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator_base_funcs.h:118:5: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
In file included from /nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator.h:65,
from /nix/gcc/include/c++/14.2.1.20250322/string:48:
/nix/gcc/include/c++/14.2.1.20250322/ext/type_traits.h:164:35: error: ‘constexpr const bool __gnu_cxx::__is_null_pointer’ redeclared as different kind of entity
164 | __is_null_pointer(std::nullptr_t)
| ^
/nix/gcc/include/c++/14.2.1.20250322/ext/type_traits.h:159:5: note: previous declaration ‘template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)’
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/type_traits.h:164:26: error: ‘nullptr_t’ is not a member of ‘std’
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /nix/gcc/include/c++/14.2.1.20250322/bits/stl_iterator.h:67:
/nix/gcc/include/c++/14.2.1.20250322/bits/ptr_traits.h:156:47: error: ‘ptrdiff_t’ was not declared in this scope
156 | using difference_type = __detected_or_t<ptrdiff_t, __diff_t, _Ptr>;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/ptr_traits.h:1:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
+++ |+#include <cstddef>
1 | // Pointer Traits -*- C++ -*-
/nix/gcc/include/c++/14.2.1.20250322/bits/ptr_traits.h:156:72: error: template argument 1 is invalid
156 | using difference_type = __detected_or_t<ptrdiff_t, __diff_t, _Ptr>;
| ^
/nix/gcc/include/c++/14.2.1.20250322/bits/ptr_traits.h:194:15: error: ‘ptrdiff_t’ does not name a type
194 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/ptr_traits.h:194:15: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
In file included from /nix/gcc/include/c++/14.2.1.20250322/string:51:
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h: In static member function ‘static _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h:450:17: error: ‘ptrdiff_t’ does not name a type
450 | const ptrdiff_t _Num = __last - __first;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h:72:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
71 | #include <bits/predefined_ops.h>
+++ |+#include <cstddef>
72 | #if __cplusplus >= 201103L
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h:451:32: error: ‘_Num’ was not declared in this scope
451 | if (__builtin_expect(_Num > 1, true))
| ^~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h:456:29: error: ‘_Num’ was not declared in this scope
456 | return __result + _Num;
| ^~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h: In static member function ‘static _Up* std::__copy_move_backward<_IsMove, true, std::random_access_iterator_tag>::__copy_move_b(_Tp*, _Tp*, _Up*)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h:764:17: error: ‘ptrdiff_t’ does not name a type
764 | const ptrdiff_t _Num = __last - __first;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h:764:17: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h:765:32: error: ‘_Num’ was not declared in this scope
765 | if (__builtin_expect(_Num > 1, true))
| ^~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h:770:29: error: ‘_Num’ was not declared in this scope
770 | return __result - _Num;
| ^~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h: At global scope:
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h:1386:16: error: ‘ptrdiff_t’ does not name a type
1386 | static ptrdiff_t
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/stl_algobase.h:1386:16: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; this is probably fixable by adding ‘#include <cstddef>’
In file included from /nix/gcc/include/c++/14.2.1.20250322/ext/alloc_traits.h:34,
from /nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:39,
from /nix/gcc/include/c++/14.2.1.20250322/string:54:
/nix/gcc/include/c++/14.2.1.20250322/bits/alloc_traits.h:482:36: error: ‘ptrdiff_t’ in namespace ‘std’ does not name a type
482 | using difference_type = std::ptrdiff_t;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/alloc_traits.h:485:30: error: ‘size_t’ in namespace ‘std’ does not name a type
485 | using size_type = std::size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/alloc_traits.h:514:37: error: ‘size_type’ has not been declared
514 | allocate(allocator_type& __a, size_type __n)
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/alloc_traits.h:529:37: error: ‘size_type’ has not been declared
529 | allocate(allocator_type& __a, size_type __n,
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/alloc_traits.h:549:52: error: ‘size_type’ has not been declared
549 | deallocate(allocator_type& __a, pointer __p, size_type __n)
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/alloc_traits.h:609:35: error: ‘size_type’ does not name a type; did you mean ‘true_type’?
609 | static _GLIBCXX20_CONSTEXPR size_type
| ^~~~~~~~~
| true_type
/nix/gcc/include/c++/14.2.1.20250322/bits/alloc_traits.h:659:36: error: ‘ptrdiff_t’ in namespace ‘std’ does not name a type
659 | using difference_type = std::ptrdiff_t;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/alloc_traits.h:662:30: error: ‘size_t’ in namespace ‘std’ does not name a type
662 | using size_type = std::size_t;
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/alloc_traits.h:684:33: error: ‘size_type’ has not been declared
684 | allocate(allocator_type&, size_type, const void* = nullptr) = delete;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/alloc_traits.h:688:42: error: ‘size_type’ has not been declared
688 | deallocate(allocator_type&, void*, size_type) = delete;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/alloc_traits.h:723:14: error: ‘size_type’ does not name a type; did you mean ‘true_type’?
723 | static size_type
| ^~~~~~~~~
| true_type
In file included from /nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4154:
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:57:58: error: ‘std::size_t’ has not been declared
57 | const char* __name, const _CharT* __str, std::size_t* __idx,
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:101:48: error: ‘std::size_t’ has not been declared
101 | __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*,
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:102:59: error: ‘std::size_t’ has not been declared
102 | __builtin_va_list), std::size_t __n,
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/alloc_traits.h: In instantiation of ‘struct __gnu_cxx::__alloc_traits<std::allocator<char>, char>’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:94:24: required from ‘class std::__cxx11::basic_string<char>’
94 | rebind<_CharT>::other _Char_alloc_type;
| ^~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4165:68: required from here
4165 | { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(),
| ^
/nix/gcc/include/c++/14.2.1.20250322/ext/alloc_traits.h:56:53: error: no type named ‘size_type’ in ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::_Base_type’ {aka ‘struct std::allocator_traits<std::allocator<char> >’}
56 | typedef typename _Base_type::size_type size_type;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/alloc_traits.h:57:53: error: no type named ‘difference_type’ in ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::_Base_type’ {aka ‘struct std::allocator_traits<std::allocator<char> >’}
57 | typedef typename _Base_type::difference_type difference_type;
| ^~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/alloc_traits.h:65:23: error: ‘max_size’ has not been declared in ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::_Base_type’
65 | using _Base_type::max_size;
| ^~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘int std::__cxx11::stoi(const std::string&, size_t*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4165:40: error: no matching function for call to ‘__stoa<long int, int>(long int (*)(const char*, char**, int) noexcept, const char [5], const char*, size_t*&, int&)’
4165 | { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4166 | __idx, __base); }
| ~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4166:41: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4166 | __idx, __base); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘long int std::__cxx11::stol(const std::string&, size_t*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4170:29: error: no matching function for call to ‘__stoa(long int (*)(const char*, char**, int) noexcept, const char [5], const char*, size_t*&, int&)’
4170 | { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(),
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4171 | __idx, __base); }
| ~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4171:30: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4171 | __idx, __base); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘long unsigned int std::__cxx11::stoul(const std::string&, size_t*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4175:29: error: no matching function for call to ‘__stoa(long unsigned int (*)(const char*, char**, int) noexcept, const char [6], const char*, size_t*&, int&)’
4175 | { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(),
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4176 | __idx, __base); }
| ~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4176:30: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4176 | __idx, __base); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘long long int std::__cxx11::stoll(const std::string&, size_t*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4181:29: error: no matching function for call to ‘__stoa(long long int (*)(const char*, char**, int) noexcept, const char [6], const char*, size_t*&, int&)’
4181 | { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(),
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4182 | __idx, __base); }
| ~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4182:30: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4182 | __idx, __base); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘long long unsigned int std::__cxx11::stoull(const std::string&, size_t*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4186:29: error: no matching function for call to ‘__stoa(long long unsigned int (*)(const char*, char**, int) noexcept, const char [7], const char*, size_t*&, int&)’
4186 | { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(),
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4187 | __idx, __base); }
| ~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4187:30: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4187 | __idx, __base); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘double std::__cxx11::stod(const std::string&, size_t*)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4200:29: error: no matching function for call to ‘__stoa(double (*)(const char*, char**) noexcept, const char [5], const char*, size_t*&)’
4200 | { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4200:67: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4200 | { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘float std::__cxx11::stof(const std::string&, size_t*)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4206:29: error: no matching function for call to ‘__stoa(float (*)(const char*, char**) noexcept, const char [5], const char*, size_t*&)’
4206 | { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4206:67: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4206 | { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘long double std::__cxx11::stold(const std::string&, size_t*)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4228:29: error: no matching function for call to ‘__stoa(long double (*)(const char*, char**) noexcept, const char [6], const char*, size_t*&)’
4228 | { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4228:69: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4228 | { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4249:11: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘__resize_and_overwrite’
4249 | __str.__resize_and_overwrite(__neg + __len, [=](char* __p, size_t __n) {
| ^~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(unsigned int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4266:11: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘__resize_and_overwrite’
4266 | __str.__resize_and_overwrite(__len, [__val](char* __p, size_t __n) {
| ^~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(long int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4284:11: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘__resize_and_overwrite’
4284 | __str.__resize_and_overwrite(__neg + __len, [=](char* __p, size_t __n) {
| ^~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(long unsigned int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4301:11: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘__resize_and_overwrite’
4301 | __str.__resize_and_overwrite(__len, [__val](char* __p, size_t __n) {
| ^~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(long long int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4317:11: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘__resize_and_overwrite’
4317 | __str.__resize_and_overwrite(__neg + __len, [=](char* __p, size_t __n) {
| ^~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(long long unsigned int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4331:11: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘__resize_and_overwrite’
4331 | __str.__resize_and_overwrite(__len, [__val](char* __p, size_t __n) {
| ^~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(float)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4405:43: error: no matching function for call to ‘__to_xstring<std::string>(int (*)(char*, size_t, const char*, __va_list_tag*) noexcept, const int&, const char [3], float&)’
4405 | return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
4406 | "%f", __val);
| ~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:101:5: note: candidate: ‘template<class _String, class _CharT> _String __gnu_cxx::__to_xstring(int (*)(_CharT*, int, const _CharT*, __va_list_tag*), int, const _CharT*, ...)’
101 | __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*,
| ^~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:101:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4405:43: note: mismatched types ‘int’ and ‘size_t’ {aka ‘long unsigned int’}
4405 | return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
4406 | "%f", __val);
| ~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(double)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4415:43: error: no matching function for call to ‘__to_xstring<std::string>(int (*)(char*, size_t, const char*, __va_list_tag*) noexcept, const int&, const char [3], double&)’
4415 | return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
4416 | "%f", __val);
| ~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:101:5: note: candidate: ‘template<class _String, class _CharT> _String __gnu_cxx::__to_xstring(int (*)(_CharT*, int, const _CharT*, __va_list_tag*), int, const _CharT*, ...)’
101 | __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*,
| ^~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:101:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4415:43: note: mismatched types ‘int’ and ‘size_t’ {aka ‘long unsigned int’}
4415 | return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
4416 | "%f", __val);
| ~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(long double)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4425:43: error: no matching function for call to ‘__to_xstring<std::string>(int (*)(char*, size_t, const char*, __va_list_tag*) noexcept, const int&, const char [4], long double&)’
4425 | return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
4426 | "%Lf", __val);
| ~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:101:5: note: candidate: ‘template<class _String, class _CharT> _String __gnu_cxx::__to_xstring(int (*)(_CharT*, int, const _CharT*, __va_list_tag*), int, const _CharT*, ...)’
101 | __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*,
| ^~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:101:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4425:43: note: mismatched types ‘int’ and ‘size_t’ {aka ‘long unsigned int’}
4425 | return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
4426 | "%Lf", __val);
| ~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/alloc_traits.h: In instantiation of ‘struct __gnu_cxx::__alloc_traits<std::allocator<wchar_t>, wchar_t>’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:94:24: required from ‘class std::__cxx11::basic_string<wchar_t>’
94 | rebind<_CharT>::other _Char_alloc_type;
| ^~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4433:68: required from here
4433 | { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),
| ^
/nix/gcc/include/c++/14.2.1.20250322/ext/alloc_traits.h:56:53: error: no type named ‘size_type’ in ‘__gnu_cxx::__alloc_traits<std::allocator<wchar_t>, wchar_t>::_Base_type’ {aka ‘struct std::allocator_traits<std::allocator<wchar_t> >’}
56 | typedef typename _Base_type::size_type size_type;
| ^~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/alloc_traits.h:57:53: error: no type named ‘difference_type’ in ‘__gnu_cxx::__alloc_traits<std::allocator<wchar_t>, wchar_t>::_Base_type’ {aka ‘struct std::allocator_traits<std::allocator<wchar_t> >’}
57 | typedef typename _Base_type::difference_type difference_type;
| ^~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/alloc_traits.h:65:23: error: ‘max_size’ has not been declared in ‘__gnu_cxx::__alloc_traits<std::allocator<wchar_t>, wchar_t>::_Base_type’
65 | using _Base_type::max_size;
| ^~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘int std::__cxx11::stoi(const std::wstring&, size_t*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4433:40: error: no matching function for call to ‘__stoa<long int, int>(long int (*)(const wchar_t*, wchar_t**, int) noexcept, const char [5], const wchar_t*, size_t*&, int&)’
4433 | { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4434 | __idx, __base); }
| ~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4434:41: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4434 | __idx, __base); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘long int std::__cxx11::stol(const std::wstring&, size_t*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4438:29: error: no matching function for call to ‘__stoa(long int (*)(const wchar_t*, wchar_t**, int) noexcept, const char [5], const wchar_t*, size_t*&, int&)’
4438 | { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(),
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4439 | __idx, __base); }
| ~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4439:30: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4439 | __idx, __base); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘long unsigned int std::__cxx11::stoul(const std::wstring&, size_t*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4443:29: error: no matching function for call to ‘__stoa(long unsigned int (*)(const wchar_t*, wchar_t**, int) noexcept, const char [6], const wchar_t*, size_t*&, int&)’
4443 | { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(),
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4444 | __idx, __base); }
| ~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4444:30: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4444 | __idx, __base); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘long long int std::__cxx11::stoll(const std::wstring&, size_t*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4448:29: error: no matching function for call to ‘__stoa(long long int (*)(const wchar_t*, wchar_t**, int) noexcept, const char [6], const wchar_t*, size_t*&, int&)’
4448 | { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(),
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4449 | __idx, __base); }
| ~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4449:30: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4449 | __idx, __base); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘long long unsigned int std::__cxx11::stoull(const std::wstring&, size_t*, int)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4453:29: error: no matching function for call to ‘__stoa(long long unsigned int (*)(const wchar_t*, wchar_t**, int) noexcept, const char [7], const wchar_t*, size_t*&, int&)’
4453 | { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(),
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4454 | __idx, __base); }
| ~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4454:30: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4454 | __idx, __base); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘float std::__cxx11::stof(const std::wstring&, size_t*)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4459:29: error: no matching function for call to ‘__stoa(float (*)(const wchar_t*, wchar_t**) noexcept, const char [5], const wchar_t*, size_t*&)’
4459 | { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); }
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4459:67: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4459 | { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘double std::__cxx11::stod(const std::wstring&, size_t*)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4463:29: error: no matching function for call to ‘__stoa(double (*)(const wchar_t*, wchar_t**) noexcept, const char [5], const wchar_t*, size_t*&)’
4463 | { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); }
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4463:67: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4463 | { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘long double std::__cxx11::stold(const std::wstring&, size_t*)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4467:29: error: no matching function for call to ‘__stoa(long double (*)(const wchar_t*, wchar_t**) noexcept, const char [6], const wchar_t*, size_t*&)’
4467 | { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
56 | __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
| ^~~~~~
/nix/gcc/include/c++/14.2.1.20250322/ext/string_conversions.h:56:5: note: template argument deduction/substitution failed:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4467:69: note: cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
4467 | { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }
| ^~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h: In function ‘std::wstring std::__cxx11::__to_wstring_numeric(const std::string&)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4531:51: error: ‘const std::string’ {aka ‘const class std::__cxx11::basic_string<char>’} has no member named ‘size’
4531 | return wstring(__s.data(), __s.data() + __s.size());
| ^~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4536:14: error: ‘std::wstring’ {aka ‘class std::__cxx11::basic_string<wchar_t>’} has no member named ‘__resize_and_overwrite’
4536 | __ws.__resize_and_overwrite(__s.size(),
| ^~~~~~~~~~~~~~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.h:4536:41: error: ‘const std::string’ {aka ‘const class std::__cxx11::basic_string<char>’} has no member named ‘size’
4536 | __ws.__resize_and_overwrite(__s.size(),
| ^~~~
In file included from /nix/gcc/include/c++/14.2.1.20250322/string:55:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.tcc: In function ‘std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’:
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.tcc:857:21: error: ‘streamsize’ does not name a type
857 | const streamsize __w = __in.width();
| ^~~~~~~~~~
/nix/gcc/include/c++/14.2.1.20250322/bits/basic_string.tcc:858:39: error: ‘__w’ was not declared in this scope; did you mean ‘__n’?
858 | const __size_type __n = __w > 0 ? static_cast<__size_type>(__w)
| ^~~
| __n
foo.cc: At global scope:
foo.cc:10:5: error: redefinition of ‘int main()’
10 | int main() {
| ^~~~
foo.cc:3:5: note: ‘int main()’ previously defined here
3 | int main()
| ^~~~
foo.cc: In function ‘int main()’:
foo.cc:12:5: error: ‘cin’ was not declared in this scope
12 | cin >> num;
| ^~~
foo.cc:8:1: note: ‘std::cin’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
7 | #include <string>
+++ |+#include <iostream>
8 | using namespace std;
foo.cc:13:21: error: no match for ‘operator[]’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘int’)
13 | char first = num[0];
| ^
foo.cc:14:32: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘size’
14 | for (size_t i = 0; i < num.size() - 1; ++i) {
| ^~~~
foo.cc:15:12: error: no match for ‘operator[]’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘size_t’ {aka ‘long unsigned int’})
15 | num[i] = num[i + 1];
| ^
foo.cc:15:21: error: no match for ‘operator[]’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘size_t’ {aka ‘long unsigned int’})
15 | num[i] = num[i + 1];
| ^
foo.cc:17:13: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘size’
17 | num[num.size() - 1] = first;
| ^~~~
foo.cc:19:5: error: ‘cout’ was not declared in this scope
19 | cout << result << endl;
| ^~~~
foo.cc:19:5: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:19:23: error: ‘endl’ was not declared in this scope
19 | cout << result << endl;
| ^~~~
foo.cc:8:1: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’
7 | #include <string>
+++ |+#include <ostream>
8 | using namespace std;