diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmJSONHelpers.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmJSONHelpers.h b/Source/cmJSONHelpers.h index 2da2a03..a63347d 100644 --- a/Source/cmJSONHelpers.h +++ b/Source/cmJSONHelpers.h @@ -29,6 +29,9 @@ public: template <typename M, typename F> cmJSONObjectHelper& Bind(const cm::string_view& name, std::nullptr_t, F func, bool required = true); + template <typename F> + cmJSONObjectHelper& Bind(const cm::string_view& name, F func, + bool required = true); E operator()(T& out, const Json::Value* value) const; @@ -87,6 +90,14 @@ cmJSONObjectHelper<T, E>& cmJSONObjectHelper<T, E>::Bind( } template <typename T, typename E> +template <typename F> +cmJSONObjectHelper<T, E>& cmJSONObjectHelper<T, E>::Bind( + const cm::string_view& name, F func, bool required) +{ + return this->BindPrivate(name, MemberFunction(func), required); +} + +template <typename T, typename E> cmJSONObjectHelper<T, E>& cmJSONObjectHelper<T, E>::BindPrivate( const cm::string_view& name, MemberFunction&& func, bool required) { |