Comments (6)
You're really fast :D
from glaze.
I also get this error when I want to write for ndjson
external/_main~conan_extension~glaze/include/glaze/util/dtoa.hpp:998:20: error: assigning to 'std::byte' from incompatible type 'char'
*buffer = '-';
^~~
external/_main~conan_extension~glaze/include/glaze/core/write_chars.hpp:88:38: note: in instantiation of function template specialization 'glz::to_chars<double, std::byte>' requested here
const auto end = glz::to_chars(start, value);
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:225:29: note: in instantiation of function template specialization 'glz::detail::write_chars::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<std::byte> &, double &, glz::context &, unsigned long &>' requested here
write_chars::op<Opts>(value, ctx, b, ix);
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:31:55: note: in instantiation of function template specialization 'glz::detail::to_json<double>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<std::byte> &, double &, glz::context &, unsigned long &>' requested here
to_json<std::remove_cvref_t<T>>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx),
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:854:35: note: in instantiation of function template specialization 'glz::detail::write<10>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, double &, glz::context &, std::vector<std::byte> &, unsigned long &>' requested here
write<json>::op<Opts>(val, ctx, args...);
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:44:34: note: in instantiation of function template specialization 'glz::detail::to_json<std::variant<std::nullptr_t, double, std::string, bool, std::vector<glz::json_t>, std::map<std::string, glz::json_t, std::less<void>>>>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<std::byte> &, unsigned long &, std::variant<std::nullptr_t, double, std::string, bool, std::vector<glz::json_t>, std::map<std::string, glz::json_t, std::less<void>>> &, glz::context &>' requested here
to_json<V>::template op<Opts>(get_member(std::forward<Value>(value), meta_wrapper_v<T>),
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:31:55: note: (skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
to_json<std::remove_cvref_t<T>>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx),
^
external/_main~conan_extension~glaze/include/glaze/json/ndjson.hpp:161:50: note: in instantiation of function template specialization 'glz::detail::to_ndjson<std::vector<glz::json_t>>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<std::byte> &, unsigned long &, std::vector<glz::json_t> &, glz::context &>' requested here
to_ndjson<std::decay_t<T>>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx),
^
external/_main~conan_extension~glaze/include/glaze/core/write.hpp:24:44: note: in instantiation of function template specialization 'glz::detail::write<100>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<glz::json_t> &, glz::context &, std::vector<std::byte> &, unsigned long &>' requested here
detail::write<Opts.format>::template op<Opts>(std::forward<T>(value), ctx, buffer, ix);
^
external/_main~conan_extension~glaze/include/glaze/core/write.hpp:56:14: note: in instantiation of function template specialization 'glz::write<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<glz::json_t> &, std::vector<std::byte>, glz::context &>' requested here
return write<Opts>(std::forward<T>(value), buffer, ctx);
^
external/_main~conan_extension~glaze/include/glaze/json/ndjson.hpp:298:14: note: in instantiation of function template specialization 'glz::write<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<glz::json_t> &, std::vector<std::byte>>' requested here
return write<opts{.format = ndjson}>(std::forward<T>(value), std::forward<Buffer>(buffer));
^
src/resourcesPool/memoizedFile.cc:99:22: note: in instantiation of function template specialization 'glz::write_ndjson<std::vector<glz::json_t> &, std::vector<std::byte> &>' requested here
auto ec = glz::write_ndjson(m_json_, data);
^
In file included from src/resourcesPool/memoizedFile.cc:1:
In file included from ./src/resourcesPool/memoizedFile.h:6:
In file included from external/_main~conan_extension~glaze/include/glaze/glaze.hpp:35:
In file included from external/_main~conan_extension~glaze/include/glaze/binary.hpp:6:
In file included from external/_main~conan_extension~glaze/include/glaze/binary/custom.hpp:6:
In file included from external/_main~conan_extension~glaze/include/glaze/binary/read.hpp:7:
In file included from external/_main~conan_extension~glaze/include/glaze/binary/skip.hpp:8:
In file included from external/_main~conan_extension~glaze/include/glaze/core/read.hpp:9:
In file included from external/_main~conan_extension~glaze/include/glaze/core/common.hpp:27:
In file included from external/_main~conan_extension~glaze/include/glaze/util/validate.hpp:10:
In file included from external/_main~conan_extension~glaze/include/glaze/core/write_chars.hpp:11:
external/_main~conan_extension~glaze/include/glaze/util/dtoa.hpp:903:16: error: assigning to 'std::byte' from incompatible type 'uint8_t' (aka 'unsigned char')
buf[0] = uint8_t(a + '0');
^~~~~~~~~~~~~~~~
external/_main~conan_extension~glaze/include/glaze/util/dtoa.hpp:1041:31: note: in instantiation of function template specialization 'glz::write_u64_len_15_to_17_trim<std::byte>' requested here
auto num_end = write_u64_len_15_to_17_trim(num_hdr, sig_dec);
^
external/_main~conan_extension~glaze/include/glaze/core/write_chars.hpp:88:38: note: in instantiation of function template specialization 'glz::to_chars<double, std::byte>' requested here
const auto end = glz::to_chars(start, value);
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:225:29: note: in instantiation of function template specialization 'glz::detail::write_chars::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<std::byte> &, double &, glz::context &, unsigned long &>' requested here
write_chars::op<Opts>(value, ctx, b, ix);
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:31:55: note: in instantiation of function template specialization 'glz::detail::to_json<double>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<std::byte> &, double &, glz::context &, unsigned long &>' requested here
to_json<std::remove_cvref_t<T>>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx),
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:854:35: note: in instantiation of function template specialization 'glz::detail::write<10>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, double &, glz::context &, std::vector<std::byte> &, unsigned long &>' requested here
write<json>::op<Opts>(val, ctx, args...);
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:44:34: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
to_json<V>::template op<Opts>(get_member(std::forward<Value>(value), meta_wrapper_v<T>),
^
external/_main~conan_extension~glaze/include/glaze/json/ndjson.hpp:161:50: note: in instantiation of function template specialization 'glz::detail::to_ndjson<std::vector<glz::json_t>>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<std::byte> &, unsigned long &, std::vector<glz::json_t> &, glz::context &>' requested here
to_ndjson<std::decay_t<T>>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx),
^
external/_main~conan_extension~glaze/include/glaze/core/write.hpp:24:44: note: in instantiation of function template specialization 'glz::detail::write<100>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<glz::json_t> &, glz::context &, std::vector<std::byte> &, unsigned long &>' requested here
detail::write<Opts.format>::template op<Opts>(std::forward<T>(value), ctx, buffer, ix);
^
external/_main~conan_extension~glaze/include/glaze/core/write.hpp:56:14: note: in instantiation of function template specialization 'glz::write<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<glz::json_t> &, std::vector<std::byte>, glz::context &>' requested here
return write<Opts>(std::forward<T>(value), buffer, ctx);
^
external/_main~conan_extension~glaze/include/glaze/json/ndjson.hpp:298:14: note: in instantiation of function template specialization 'glz::write<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<glz::json_t> &, std::vector<std::byte>>' requested here
return write<opts{.format = ndjson}>(std::forward<T>(value), std::forward<Buffer>(buffer));
^
src/resourcesPool/memoizedFile.cc:99:22: note: in instantiation of function template specialization 'glz::write_ndjson<std::vector<glz::json_t> &, std::vector<std::byte> &>' requested here
auto ec = glz::write_ndjson(m_json_, data);
^
In file included from src/resourcesPool/memoizedFile.cc:1:
In file included from ./src/resourcesPool/memoizedFile.h:6:
In file included from external/_main~conan_extension~glaze/include/glaze/glaze.hpp:35:
In file included from external/_main~conan_extension~glaze/include/glaze/binary.hpp:6:
In file included from external/_main~conan_extension~glaze/include/glaze/binary/custom.hpp:6:
In file included from external/_main~conan_extension~glaze/include/glaze/binary/read.hpp:7:
In file included from external/_main~conan_extension~glaze/include/glaze/binary/skip.hpp:8:
In file included from external/_main~conan_extension~glaze/include/glaze/core/read.hpp:9:
In file included from external/_main~conan_extension~glaze/include/glaze/core/common.hpp:27:
In file included from external/_main~conan_extension~glaze/include/glaze/util/validate.hpp:10:
In file included from external/_main~conan_extension~glaze/include/glaze/core/write_chars.hpp:11:
external/_main~conan_extension~glaze/include/glaze/util/dtoa.hpp:1042:28: error: assigning to 'std::byte' from incompatible type 'char'
buffer[0] = '0';
^~~
external/_main~conan_extension~glaze/include/glaze/core/write_chars.hpp:88:38: note: in instantiation of function template specialization 'glz::to_chars<double, std::byte>' requested here
const auto end = glz::to_chars(start, value);
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:225:29: note: in instantiation of function template specialization 'glz::detail::write_chars::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<std::byte> &, double &, glz::context &, unsigned long &>' requested here
write_chars::op<Opts>(value, ctx, b, ix);
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:31:55: note: in instantiation of function template specialization 'glz::detail::to_json<double>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<std::byte> &, double &, glz::context &, unsigned long &>' requested here
to_json<std::remove_cvref_t<T>>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx),
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:854:35: note: in instantiation of function template specialization 'glz::detail::write<10>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, double &, glz::context &, std::vector<std::byte> &, unsigned long &>' requested here
write<json>::op<Opts>(val, ctx, args...);
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:44:34: note: in instantiation of function template specialization 'glz::detail::to_json<std::variant<std::nullptr_t, double, std::string, bool, std::vector<glz::json_t>, std::map<std::string, glz::json_t, std::less<void>>>>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<std::byte> &, unsigned long &, std::variant<std::nullptr_t, double, std::string, bool, std::vector<glz::json_t>, std::map<std::string, glz::json_t, std::less<void>>> &, glz::context &>' requested here
to_json<V>::template op<Opts>(get_member(std::forward<Value>(value), meta_wrapper_v<T>),
^
external/_main~conan_extension~glaze/include/glaze/json/write.hpp:31:55: note: (skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
to_json<std::remove_cvref_t<T>>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx),
^
external/_main~conan_extension~glaze/include/glaze/json/ndjson.hpp:161:50: note: in instantiation of function template specialization 'glz::detail::to_ndjson<std::vector<glz::json_t>>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<std::byte> &, unsigned long &, std::vector<glz::json_t> &, glz::context &>' requested here
to_ndjson<std::decay_t<T>>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx),
^
external/_main~conan_extension~glaze/include/glaze/core/write.hpp:24:44: note: in instantiation of function template specialization 'glz::detail::write<100>::op<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<glz::json_t> &, glz::context &, std::vector<std::byte> &, unsigned long &>' requested here
detail::write<Opts.format>::template op<Opts>(std::forward<T>(value), ctx, buffer, ix);
^
external/_main~conan_extension~glaze/include/glaze/core/write.hpp:56:14: note: in instantiation of function template specialization 'glz::write<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<glz::json_t> &, std::vector<std::byte>, glz::context &>' requested here
return write<Opts>(std::forward<T>(value), buffer, ctx);
^
external/_main~conan_extension~glaze/include/glaze/json/ndjson.hpp:298:14: note: in instantiation of function template specialization 'glz::write<{100, false, true, true, true, false, false, 32, 3, true, false, true, false, false, false, 0, 0, false, false, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false}, std::vector<glz::json_t> &, std::vector<std::byte>>' requested here
return write<opts{.format = ndjson}>(std::forward<T>(value), std::forward<Buffer>(buffer));
^
src/resourcesPool/memoizedFile.cc:99:22: note: in instantiation of function template specialization 'glz::write_ndjson<std::vector<glz::json_t> &, std::vector<std::byte> &>' requested here
auto ec = glz::write_ndjson(m_json_, data);
^
In file included from src/resourcesPool/memoizedFile.cc:1:
In file included from ./src/resourcesPool/memoizedFile.h:6:
In file included from external/_main~conan_extension~glaze/include/glaze/glaze.hpp:35:
In file included from external/_main~conan_extension~glaze/include/glaze/binary.hpp:6:
In file included from external/_main~conan_extension~glaze/include/glaze/binary/custom.hpp:6:
In file included from external/_main~conan_extension~glaze/include/glaze/binary/read.hpp:7:
In file included from external/_main~conan_extension~glaze/include/glaze/binary/skip.hpp:8:
In file included from external/_main~conan_extension~glaze/include/glaze/core/read.hpp:9:
In file included from external/_main~conan_extension~glaze/include/glaze/core/common.hpp:27:
In file included from external/_main~conan_extension~glaze/include/glaze/util/validate.hpp:10:
In file included from external/_main~conan_extension~glaze/include/glaze/core/write_chars.hpp:11:
external/_main~conan_extension~glaze/include/glaze/util/dtoa.hpp:1043:28: error: assigning to 'std::byte' from incompatible type 'char'
buffer[1] = '.';
from glaze.
The issue is actually not with ndjson, but with writing to std::vector<std::byte>
. I've fixed this in #1089 and will merge soon.
I still have to fix binary support for glz::json_t
from glaze.
I see. Do you have an estimate for the completion date for Binary?
from glaze.
Binary support should get merged in the next hour. Active merge request: #1090
from glaze.
Binary support for json_t
has been merged
from glaze.
Related Issues (20)
- GLZ_FLATTEN adds significant compilation time on gcc. HOT 12
- host_include -> file_include -> fails parsing with `expected_comma`
- std::array<char> partial read handling HOT 10
- Binary (BEVE) support lacking for object keys HOT 8
- Type selection when reading to a variant HOT 1
- Update to v3.2.2 causes compilation errors HOT 9
- new_lines_in_arrays option should apply to writing JSON and not just prettify_json
- std::pair of structs fails round trip HOT 2
- Any struct with any members named "first" and "second" in any order is treated as a std::pair HOT 4
- can't write enum with the highest value HOT 4
- There seems to be an error. HOT 10
- Possible bug following examples in the README? HOT 2
- _GLIBCXX_DEBUG for libstdc++ cannot currently be used with glaze HOT 6
- Compilation error on 32-bit system HOT 6
- "expected_quote" Error in Variant Parsing with Unrelated JSON Key Length in glaze v3.3.1 HOT 2
- Disable exceptions if a specific macro is defined HOT 1
- AppleClang std::hash<std::filesystem::path> issue HOT 4
- Buffer length checking when writing to a raw buffer
- Runtime JSON pointer syntax for writing
- hang in glz::beve_to_json HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glaze.