jtm
jtm copied to clipboard
m4l490n
The code doesn't compile. Here is the list of compilation errors:
In file included from lib/jtml.hpp:157,
from jtm.cpp:4:
lib/Json.hpp: In member function ‘const Jnode::Iterator<T>::SuperJnode& Jnode::Iterator<T>::SuperJnode::operator()(const std::string&, const Jnode&) const’:
lib/Json.hpp:1022:37: error: assignment of member ‘Jnode::Iterator<T>::SuperJnode::lbp_’ in read-only object
1022 | { lbp_ = &s; jnp_ = &jn; return *this; }
| ~~~~~^~~~
lib/Json.hpp:1022:48: error: assignment of member ‘Jnode::Iterator<T>::SuperJnode::jnp_’ in read-only object
1022 | { lbp_ = &s; jnp_ = &jn; return *this; }
| ~~~~~^~~~~
lib/Json.hpp: In member function ‘void Json::parse_(Jnode&, std::__cxx11::basic_string<char>::const_iterator&)’:
lib/Json.hpp:1857:25: error: ‘strlen’ is not a member of ‘std’; did you mean ‘mbrlen’?
1857 | bool truncate = std::strlen(&*jsp) > (DBG_WIDTH-sizeof(pfx));
| ^~~~~~
| mbrlen
lib/Json.hpp: In member function ‘Jnode::Jtype Json::classify_jnode_(std::__cxx11::basic_string<char>::const_iterator&)’:
lib/Json.hpp:2032:10: error: ‘strncmp’ is not a member of ‘std’; did you mean ‘strncmp’?
2032 | if(std::strncmp(str, STR_TRUE, sizeof(STR_TRUE)-1) == 0) return Jnode::Bool;
| ^~~~~~~
In file included from lib/jtml.hpp:150:
/usr/include/string.h:159:12: note: ‘strncmp’ declared here
159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n)
| ^~~~~~~
lib/Json.hpp:2033:10: error: ‘strncmp’ is not a member of ‘std’; did you mean ‘strncmp’?
2033 | if(std::strncmp(str, STR_FALSE, sizeof(STR_FALSE)-1) == 0) return Jnode::Bool;
| ^~~~~~~
/usr/include/string.h:159:12: note: ‘strncmp’ declared here
159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n)
| ^~~~~~~
lib/Json.hpp:2034:10: error: ‘strncmp’ is not a member of ‘std’; did you mean ‘strncmp’?
2034 | if(std::strncmp(str, STR_NULL, sizeof(STR_NULL)-1) == 0) return Jnode::Null;
| ^~~~~~~
/usr/include/string.h:159:12: note: ‘strncmp’ declared here
159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n)
| ^~~~~~~
lib/jtml.hpp: In member function ‘void Jtml::dbgout_parsing_point_(const_sit&) const’:
lib/jtml.hpp:834:23: error: ‘strlen’ is not a member of ‘std’; did you mean ‘mbrlen’?
834 | bool truncate = std::strlen(&*si) > (DBG_WIDTH-sizeof(pfx));
| ^~~~~~
| mbrlen
jtm.cpp: In function ‘std::string read_source(CommonResource&)’:
jtm.cpp:176:16: error: ‘istream_iterator’ was not declared in this scope
176 | return string{istream_iterator<char>(redirect?
| ^~~~~~~~~~~~~~~~
jtm.cpp:6:1: note: ‘std::istream_iterator’ is defined in header ‘<iterator>’; this is probably fixable by adding ‘#include <iterator>’
5 | #include "lib/getoptions.hpp"
+++ |+#include <iterator>
6 | #include "lib/dbg.hpp"
jtm.cpp:176:33: error: no matching function for call to ‘std::__cxx11::basic_string<char>::basic_string(<brace-enclosed initializer list>)’
176 | return string{istream_iterator<char>(redirect?
| ^~~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from jtm.cpp:1:
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate: ‘template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
765 | basic_string(_InputIterator __beg, _InputIterator __end,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
721 | basic_string(basic_string&& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
716 | basic_string(const basic_string& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:711:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:711:7: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/14/bits/basic_string.h:682:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
682 | basic_string(basic_string&& __str) noexcept
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:682:7: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
669 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:646:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
646 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:646:7: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
624 | basic_string(const _CharT* __s, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
604 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate expects 4 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
586 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
569 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:552:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
552 | basic_string(const basic_string& __str)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:552:7: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/14/bits/basic_string.h:540:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:540:7: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/14/bits/basic_string.h:527:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
527 | basic_string()
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:527:7: note: candidate expects 0 arguments, 1 provided
jtm.cpp:176:15: error: expected primary-expression before ‘{’ token
176 | return string{istream_iterator<char>(redirect?
| ^
jtm.cpp:176:15: error: expected ‘;’ before ‘{’ token
176 | return string{istream_iterator<char>(redirect?
| ^
| ;
jtm.cpp:176:33: error: expected primary-expression before ‘char’
176 | return string{istream_iterator<char>(redirect?
| ^~~~
jtm.cpp:178:77: error: expected primary-expression before ‘>>’ token
178 | ifstream{opt[0].c_str(), ifstream::in}>>noskipws),
|