Skip to content

[clang][NFC] Add regression tests for GH63782 #109104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions clang/test/SemaTemplate/concepts-out-of-line-def.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,3 +622,47 @@ void A<T>::method(Ts&... ts)
} {}

}

namespace GH63782 {
// GH63782 was also fixed by PR #80594, so let's add a test for it.

template<bool... Vals>
constexpr bool All = (Vals && ...);

template<bool... Bs>
class Class {
template<typename>
requires All<Bs...>
void Foo();
};

template<bool... Bs>
template<typename>
requires All<Bs...>
void Class<Bs...>::Foo() {
};

} // namespace GH63782

namespace eve {
// Reduced from the "eve" project

template <typename... Ts>
struct tuple {
template <int I0> requires(I0 <= sizeof...(Ts))
constexpr auto split();
};

template <typename... Ts>
template <int I0>
requires(I0 <= sizeof...(Ts))
constexpr auto tuple<Ts...>::split(){
return 0;
}

int foo() {
tuple<int, float> x;
return x.split<0>();
}

} // namespace eve
Loading