We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 703ac4c commit 16b50c3Copy full SHA for 16b50c3
1 file changed
cppjson/include/cppjson/object.hpp
@@ -67,6 +67,8 @@ namespace cppjson
67
Object& operator=(Object&&) = default;
68
~Object() = default;
69
70
+ [[nodiscard]] bool IsEmpty() const noexcept { return this->_nodes.empty(); }
71
+
72
class ObjectProxy
73
{
74
public:
@@ -76,14 +78,14 @@ namespace cppjson
76
78
requires(!std::same_as<std::remove_cvref_t<T>, JsonObject>)
77
79
explicit(false) operator T&()
80
- return this->_object.get().As<T>();
81
+ return this->_object.get().As<std::remove_cvref_t<T>>();
82
}
83
84
template <typename T>
85
86
explicit(false) operator const T&() const
87
88
+ return this->_object.get().As<const std::remove_cvref_t<T>>();
89
90
91
0 commit comments