Skip to content

Commit

Permalink
CanDeserialize now checks if fromJson returns a Result (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 authored Nov 24, 2024
1 parent 28887f4 commit a9cd466
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (NOT COMMAND CPMAddPackage)
endif()

if (NOT TARGET GeodeResult)
CPMAddPackage("gh:geode-sdk/[email protected].0")
CPMAddPackage("gh:geode-sdk/[email protected].2")
endif()

# This option is only useful for Geode itself
Expand Down
2 changes: 1 addition & 1 deletion include/matjson.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace matjson {
};
template <class T>
concept CanDeserialize = requires(matjson::Value const& value, T t) {
{ Serialize<std::remove_cvref_t<T>>::fromJson(value) };
{ Serialize<std::remove_cvref_t<T>>::fromJson(value) } -> geode::IsResult<>;
};
template <class T>
concept CanSerde = CanSerialize<T> && CanDeserialize<T>;
Expand Down

0 comments on commit a9cd466

Please sign in to comment.