From a9cd46653dcd00681f7a375adf3f57e53163a5c2 Mon Sep 17 00:00:00 2001 From: alk <45172705+altalk23@users.noreply.github.com> Date: Sun, 24 Nov 2024 19:04:35 +0300 Subject: [PATCH] `CanDeserialize` now checks if fromJson returns a Result (#16) --- CMakeLists.txt | 2 +- include/matjson.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a28a110..009c53f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ if (NOT COMMAND CPMAddPackage) endif() if (NOT TARGET GeodeResult) - CPMAddPackage("gh:geode-sdk/result@1.2.0") + CPMAddPackage("gh:geode-sdk/result@1.2.2") endif() # This option is only useful for Geode itself diff --git a/include/matjson.hpp b/include/matjson.hpp index be4bb48..5d8946e 100644 --- a/include/matjson.hpp +++ b/include/matjson.hpp @@ -73,7 +73,7 @@ namespace matjson { }; template concept CanDeserialize = requires(matjson::Value const& value, T t) { - { Serialize>::fromJson(value) }; + { Serialize>::fromJson(value) } -> geode::IsResult<>; }; template concept CanSerde = CanSerialize && CanDeserialize;