mirror of
https://github.com/nlohmann/json.git
synced 2026-10-31 18:05:44 +00:00
With the builder of accept() in the same translation unit, GCC 16's interprocedural constant propagation cloned scan_string_vector without its plain argument (always string_plain()). The parse loop of json_document::parse() then called the clone, and GCC generated different code for the whole loop: 0.7-1.2 % more instructions (twitter, citm_catalog, instruments, tree-pretty, canada) and up to +13 % time on citm_catalog. NLOHMANN_VIEW_NOCLONE (GCC only) keeps the function as written; the instruction counts of parse() are then those of develop again. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
32 lines
984 B
C++
32 lines
984 B
C++
// __ _____ _____ _____
|
|
// __| | __| | | | JSON for Modern C++
|
|
// | | |__ | | | | | | version 3.12.0
|
|
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
|
|
//
|
|
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#pragma once
|
|
|
|
// undefine the macros of detail/view/macro_scope.hpp (at the end of json_view.hpp)
|
|
|
|
#undef NLOHMANN_VIEW_HAS_CPP_17
|
|
#undef NLOHMANN_VIEW_LIKELY
|
|
#undef NLOHMANN_VIEW_UNLIKELY
|
|
#undef NLOHMANN_VIEW_ALWAYS_INLINE
|
|
#undef NLOHMANN_VIEW_NOINLINE
|
|
#undef NLOHMANN_VIEW_NOCLONE
|
|
#undef NLOHMANN_VIEW_NODISCARD
|
|
#undef NLOHMANN_VIEW_THROW
|
|
#undef NLOHMANN_VIEW_LITTLE_ENDIAN
|
|
#undef NLOHMANN_VIEW_REPEAT16
|
|
#undef NLOHMANN_VIEW_REPEAT_SECOND_8
|
|
#undef NLOHMANN_VIEW_REPEAT_FIRST_8
|
|
#undef NLOHMANN_VIEW_NEON
|
|
#undef NLOHMANN_VIEW_SSE2
|
|
#undef NLOHMANN_VIEW_SSSE3
|
|
#undef NLOHMANN_VIEW_SSSE3_DISPATCH
|
|
#undef NLOHMANN_VIEW_SSSE3_TARGET
|
|
#undef NLOHMANN_VIEW_VECTOR
|
|
#undef NLOHMANN_VIEW_VECTOR_UTF8
|