aboutsummaryrefslogtreecommitdiff
path: root/include/json/value.h
diff options
context:
space:
mode:
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); }