A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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**_

authored by

Zach Nelson and committed by
GitHub
11984f8f 1c133311

+2 -1
+2 -1
src/activities/ActivityResult.h
··· 59 59 60 60 explicit ActivityResult() = default; 61 61 62 - template <typename ResultType, typename = std::enable_if_t<std::is_constructible_v<ResultVariant, ResultType&&>>> 62 + template <typename ResultType> 63 + requires std::is_constructible_v<ResultVariant, ResultType&&> 63 64 // cppcheck-suppress noExplicitConstructor 64 65 ActivityResult(ResultType&& result) : data{std::forward<ResultType>(result)} {} 65 66 };