Skip to content

Fix declaration of the ArgsFlags concept.#24

Merged
msqr1 merged 1 commit into
msqr1:mainfrom
bangerth:fix-concept
May 10, 2026
Merged

Fix declaration of the ArgsFlags concept.#24
msqr1 merged 1 commit into
msqr1:mainfrom
bangerth:fix-concept

Conversation

@bangerth
Copy link
Copy Markdown
Contributor

The syntax used so far triggers a compiler warning for me:

/home/bangerth/tmp/g/modularizer/importizer/src/OptProcessor.cc:34:3: warning: testing if a concept-id is a valid expression; add ‘requires’ to check satisfaction [-Wmissing-requires]
   34 |   std::derived_from<T, args::FlagBase>;
      |   ^
      |   requires 

This is because the syntax

requires (T flags) {
  std::derived_from<T, args::FlagBase>;
};

only checks that the enclosed expression std::derived_from<T, args::FlagBase> is valid, not that it is true. This patch fixes it to what I assume was originally intended.

@msqr1 msqr1 merged commit 098b84b into msqr1:main May 10, 2026
@bangerth bangerth deleted the fix-concept branch May 10, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants