"_Custom data source_" form readme exemple make no sense and does not compile (?)
Some _(I think are)_ problems:
MyIterator begin(MyContainer& tgt) { return MyIterator{&tgt}; } does not compile, stop some complaining only if MyContainer& tgt is const (const MyContainer& tgt) but this make it uselessreference operator*() const {return target.get_current(); } but target is a pointer (also null)
MyIterator& operator++() {MyContainer.advance(); return *this; } what is supposed to be MyContainer.advance(); static? reference? pointer?
Tennsy 4 (Arduino)
Platformio on mac osx,
gcc-arm-embedded: 5.4.1
build_flags =
-std=c++17
-lstdc++
-lnosys
-fno-exceptions
develop branch single header versionERROR LIST:
src/main.cpp:243:27: required from here
lib/json.hpp:23225:37: error: no matching function for call to 'input_adapter(MyContainer&)'
parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result);
src/main.cpp:243:27: required from here
lib/json.hpp:5164:83: error: binding 'const MyContainer' to reference of type 'MyContainer&' discards qualifiers
auto input_adapter(const ContainerType& container) -> decltype(input_adapter(begin(container), end(container)))
md5-1d838189b6493d9915d748fb63421854
lib/json.hpp:5299:32: note: template argument deduction/substitution failed:
lib/json.hpp:5198:30: error: no type named 'type' in 'struct std::enable_if<false, int>'
int >::type = 0 >
md5-1d838189b6493d9915d748fb63421854
src/main.cpp: In member function 'MyIterator& MyIterator::operator++()':
src/main.cpp:218:20: error: expected unqualified-id before '.' token
MyContainer.advance();
md5-1d838189b6493d9915d748fb63421854
src/main.cpp: In member function 'const char& MyIterator::operator*() const':
src/main.cpp:227:23: error: request for member 'get_current' in '((const MyIterator*)this)->MyIterator::target', which is of pointer type 'MyContainer* const' (maybe you meant to use '->' ?)
return target.get_current();
Thanks in advance,
Luca
src/main.cpp?O bhai