mirror of
https://github.com/nlohmann/json.git
synced 2026-10-31 09:55:42 +00:00
tests: avoid astyle-mangled build<> call in json_view builder test
astyle pads the template argument list of the build<...>() call with spaces because the second argument is a negated expression. Name the constant first (as json_view.hpp does with nul_is_end) so astyle leaves the call alone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N5NasBf4ToHzdcoNEPAJhS
This commit is contained in:
1 file changed
+2
-1
@@ -59,7 +59,8 @@ built build(const std::string& text, bool comments, bool trailing_commas, bool s
|
||||
r.copy.assign(text.begin(), text.end());
|
||||
src = r.copy.data();
|
||||
}
|
||||
r.ok = nlohmann::detail::view::build < FloatType, !nlohmann::detail::abi_config::strict_nul_handling > (*r.data, src, text.size(), comments, trailing_commas, sentinel, false, r.failure);
|
||||
constexpr bool nul_is_end = !nlohmann::detail::abi_config::strict_nul_handling;
|
||||
r.ok = nlohmann::detail::view::build<FloatType, nul_is_end>(*r.data, src, text.size(), comments, trailing_commas, sentinel, false, r.failure);
|
||||
r.data->src = src;
|
||||
r.data->base[0] = src;
|
||||
r.data->base[1] = r.data->arena.data();
|
||||
|
||||
Reference in new issue
Block a user