From 11984f8fefc308c57a32d580b47d14b9a53e5621 Mon Sep 17 00:00:00 2001 From: Zach Nelson Date: Tue, 7 Apr 2026 08:30:52 -0500 Subject: [PATCH] refactor: Use C++20 'requires' in ActivityResult constructor (#1420) ## Summary **What is the goal of this PR?** Replace SFINAE std::enable_if_t with a C++20 `requires` clause for clearer constraint expression and better compiler diagnostics on mismatch. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_ --- src/activities/ActivityResult.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/activities/ActivityResult.h b/src/activities/ActivityResult.h index 4062fce9..0416285e 100644 --- a/src/activities/ActivityResult.h +++ b/src/activities/ActivityResult.h @@ -59,7 +59,8 @@ struct ActivityResult { explicit ActivityResult() = default; - template >> + template + requires std::is_constructible_v // cppcheck-suppress noExplicitConstructor ActivityResult(ResultType&& result) : data{std::forward(result)} {} };