mirror of
https://github.com/nlohmann/json.git
synced 2026-10-11 17:07:15 +00:00
Merge branch 'json-view/11-view-access' into json-view/13-view-dump
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
28 files changed
+1188
-472
No files matched your search
@@ -65,7 +65,18 @@ struct document_data
|
||||
}
|
||||
};
|
||||
|
||||
document_data() noexcept = default;
|
||||
/// user-provided so that the class-type members can be initialized in the
|
||||
/// member initialization list (-Weffc++ asks for it, and old GCC rejects a
|
||||
/// defaulted constructor whose exception specification differs from the
|
||||
/// implicit one); they cannot take default member initializers, which old
|
||||
/// Clang (3.4-3.6) rejects. The other members have default member
|
||||
/// initializers. noexcept: create() constructs into raw memory and could not
|
||||
/// release it if this threw (the std::string default constructors do not
|
||||
/// allocate).
|
||||
document_data() noexcept
|
||||
: arena() // NOLINT(readability-redundant-member-init)
|
||||
, owned() // NOLINT(readability-redundant-member-init)
|
||||
{}
|
||||
document_data(const document_data&) = delete;
|
||||
document_data(document_data&&) = delete;
|
||||
document_data& operator=(const document_data&) = delete;
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
#elif defined(_MSC_VER)
|
||||
#define NLOHMANN_VIEW_LIKELY(x) (x)
|
||||
#define NLOHMANN_VIEW_UNLIKELY(x) (x)
|
||||
#define NLOHMANN_VIEW_ALWAYS_INLINE __forceinline
|
||||
// plain inline: __forceinline makes MSVC report C4714 (not inlined) for
|
||||
// function templates it cannot inline, which is an error under /WX; the
|
||||
// forced inlining is only a performance hint
|
||||
#define NLOHMANN_VIEW_ALWAYS_INLINE inline
|
||||
#define NLOHMANN_VIEW_NOINLINE __declspec(noinline)
|
||||
#else
|
||||
#define NLOHMANN_VIEW_LIKELY(x) (x)
|
||||
|
||||
Reference in new issue
Block a user