diff --git a/include/nlohmann/detail/view/serializer.hpp b/include/nlohmann/detail/view/serializer.hpp index 9fc654544..5f078d08a 100644 --- a/include/nlohmann/detail/view/serializer.hpp +++ b/include/nlohmann/detail/view/serializer.hpp @@ -356,16 +356,6 @@ class view_serializer } private: - /*! - @brief the compact output without ensure_ascii (the default dump()) - - The same walk as dump(), with the write position in a local variable - (stores through char pointers would otherwise force a reload of the - buffer's members after each one), and with strings and number tokens of - the source copied by fixed-size moves of 32 bytes where the source has - that many bytes left, instead of a library call per token. The buffer - keeps 64 bytes of slack for the overshoot. - */ /// a string that is not a plain string of the source (decoded, or written /// by an edit), without ensure_ascii: runs without characters to escape /// are copied @@ -404,6 +394,16 @@ class view_serializer return option; } + /*! + @brief the compact output without ensure_ascii (the default dump()) + + The same walk as dump(), with the write position in a local variable + (stores through char pointers would otherwise force a reload of the + buffer's members after each one), and with strings and number tokens of + the source copied by fixed-size moves of 32 bytes where the source has + that many bytes left, instead of a library call per token. The buffer + keeps 64 bytes of slack for the overshoot. + */ template void dump_compact(const node* root) { @@ -525,7 +525,7 @@ class view_serializer room(n->len); copy(src + n->off, n->len); } - else if (std::is_same::value) + else if (enabled(std::is_same::value)) { room(64); w = write_double_at(w, *n);