-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Closed
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsC++20 concepts
Description
https://godbolt.org/z/e6MPqErrh
#include <concepts>
struct Outcome;
struct Fn {
Fn(Fn const&) = delete;
template<typename F>
requires (not std::same_as<Fn, std::remove_reference_t<F>>)
and std::invocable<F>
Fn(F&& f);
Outcome operator()() const;
};
struct Work {
Fn fn;
};
int main() {
}While declaring the implicit copy constructor for Work clang considers the templated constructor of Fn even though Fn declares a deleted copy constructor.
Using libc++ this becomes apparent evaluating std::invocable<const Fn&> when Outcome is used before it is defined, triggering a compilation error.
Metadata
Metadata
Assignees
Labels
clang: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