-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsC++20 concepts
Description
Bugzilla Link | 51904 |
Version | trunk |
OS | Linux |
Attachments | Test case for requires{} expressions |
CC | @zygoloid |
Extended Description
If I define a class with a void member_fn()
which contains requires{ member_fn; }
, it evaluates to true on Clang but is an error on GCC, despite member_fn;
being an error on both compilers.
If I define a template<typename T> Class : T
instantiated with a T
containing base_fn()
, and Class
contains a member function with requires{ T::base_fn; }
, it evaluates to true on Clang but false on GCC, despite base_fn;
being an error on both compilers.
Is this a Clang bug, or is my code ill-formed? I was using the value of requires{}
as an input to if constexpr
or static_assert
, rather than as a concept or template bound; is this allowed?
I've attached a file testing whether requires{}
in various positions is true, false, or an error to evaluate.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsC++20 concepts
Type
Projects
Status
Done