aboutsummaryrefslogtreecommitdiff
path: root/include/json/value.h
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:04:19 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:04:19 +0000
commit69006bc18746b54751497522493607ccd733d185 (patch)
tree5015100cb583ba035d40917cc21d3846f42adc89 /include/json/value.h
parent35369820b978918022eed0f09d615d20c8cd3fa8 (diff)
parent22d33955e4c2525e659f729c9f02afe09183b107 (diff)
downloadjsoncpp-e01925c6b00d364efc4d503840575b6490551690.tar.gz
Change-Id: I10c6e35320b938b33e02ed169bcc6635cbd4a83e
Diffstat (limited to 'include/json/value.h')
-rw-r--r--include/json/value.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/json/value.h b/include/json/value.h
index df1eba6..0edeb05 100644
--- a/include/json/value.h
+++ b/include/json/value.h
@@ -50,7 +50,7 @@
// 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)
#pragma pack(push, 8)
@@ -263,10 +263,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;
@@ -344,13 +344,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);
@@ -635,9 +635,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);
@@ -918,8 +918,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); }