diff options
| author | Brad King <brad.king@kitware.com> | 2022-01-12 22:05:54 (GMT) |
|---|---|---|
| committer | Brad King <brad.king@kitware.com> | 2022-01-12 22:05:54 (GMT) |
| commit | 33fae4cd7a344889404ce61fe1d40a443ad58def (patch) | |
| tree | 0b35ff2e6a978007be841227a731f08fccfe2ad2 /Utilities/cmjsoncpp/include/json/value.h | |
| parent | eb031dfe9fdb498592d368e900ed3e1ee2181703 (diff) | |
| parent | 7a72ab3388c5f439070167fbcefd1cbdd776be9f (diff) | |
| download | CMake-33fae4cd7a344889404ce61fe1d40a443ad58def.zip CMake-33fae4cd7a344889404ce61fe1d40a443ad58def.tar.gz CMake-33fae4cd7a344889404ce61fe1d40a443ad58def.tar.bz2 | |
Merge branch 'upstream-jsoncpp' into update-jsoncpp
* upstream-jsoncpp:
jsoncpp 2022-01-12 (42e892d9)
Diffstat (limited to 'Utilities/cmjsoncpp/include/json/value.h')
| -rw-r--r-- | Utilities/cmjsoncpp/include/json/value.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Utilities/cmjsoncpp/include/json/value.h b/Utilities/cmjsoncpp/include/json/value.h index 952d423..f6ac9e3 100644 --- a/Utilities/cmjsoncpp/include/json/value.h +++ b/Utilities/cmjsoncpp/include/json/value.h @@ -50,11 +50,12 @@ // be used by... #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) #pragma warning(push) -#pragma warning(disable : 4251) +#pragma warning(disable : 4251 4275) #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) #if !defined(__SUNPRO_CC) -#pragma pack(push, 8) +#pragma pack(push) +#pragma pack() #endif /** \brief JSON (JavaScript Object Notation). @@ -265,10 +266,10 @@ private: CZString(ArrayIndex index); CZString(char const* str, unsigned length, DuplicationPolicy allocate); CZString(CZString const& other); - CZString(CZString&& other); + CZString(CZString&& other) noexcept; ~CZString(); CZString& operator=(const CZString& other); - CZString& operator=(CZString&& other); + CZString& operator=(CZString&& other) noexcept; bool operator<(CZString const& other) const; bool operator==(CZString const& other) const; @@ -346,13 +347,13 @@ public: Value(bool value); Value(std::nullptr_t ptr) = delete; Value(const Value& other); - Value(Value&& other); + Value(Value&& other) noexcept; ~Value(); /// \note Overwrite existing comments. To preserve comments, use /// #swapPayload(). Value& operator=(const Value& other); - Value& operator=(Value&& other); + Value& operator=(Value&& other) noexcept; /// Swap everything. void swap(Value& other); @@ -637,9 +638,9 @@ private: public: Comments() = default; Comments(const Comments& that); - Comments(Comments&& that); + Comments(Comments&& that) noexcept; Comments& operator=(const Comments& that); - Comments& operator=(Comments&& that); + Comments& operator=(Comments&& that) noexcept; bool has(CommentPlacement slot) const; String get(CommentPlacement slot) const; void set(CommentPlacement slot, String comment); @@ -920,8 +921,8 @@ public: * because the returned references/pointers can be used * to change state of the base class. */ - reference operator*() { return deref(); } - pointer operator->() { return &deref(); } + reference operator*() const { return const_cast<reference>(deref()); } + pointer operator->() const { return const_cast<pointer>(&deref()); } }; inline void swap(Value& a, Value& b) { a.swap(b); } |
