https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123955
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Htamak R G from comment #0)
> Workaround:
> Scoping all concepts in a requires block to delay substitution.
>
> ```cpp
> template <typename T, typename CloseStatus>
> concept InvariantClassLike = requires {
> requires std::movable<T> &&
> (std::same_as<CloseStatus, void> ||
> std::copyable<CloseStatus>);
> };
> ```
You only need to do it for the one that causes a problem:
template <typename T, typename CloseStatus>
concept InvariantClassLike =
std::movable<T> &&
(std::same_as<CloseStatus, void>
|| requires { requires std::copyable<CloseStatus>; });