You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The top-level CMakeLists.txt specifies set(CMAKE_CXX_STANDARD 23), which means the project already requires C++23.
Given this, I would like to propose replacing unconstrained typename parameters with C++20/23 concepts where appropriate.
Motivation
Leverage modern C++: Since the project already targets C++23, we can safely use concepts without worrying about compatibility.
Improved readability: Concepts make template constraints explicit, helping users understand the intended usage more quickly.
Better diagnostics: Concepts provide clearer compiler error messages compared to unconstrained typename.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Description
The top-level CMakeLists.txt specifies
set(CMAKE_CXX_STANDARD 23), which means the project already requires C++23.Given this, I would like to propose replacing unconstrained
typenameparameters with C++20/23 concepts where appropriate.Motivation
typename.Example
Reference branch
For clarity, I have prepared a forked branch that demonstrates this idea:
https://github.com/Apricot-S/nyanten/tree/feat/concepts
Benefits
All reactions