-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
fixedSomething works now, yay!Something works now, yay!rangesC++20/23 rangesC++20/23 rangestestRelated to test codeRelated to test code
Description
Currently P2415R2_owning_view\test.cpp looks like this:
// [banner, headers]
struct instantiator {
template <ranges::input_range R>
static constexpr void call() {
if constexpr (move_constructible<R>) {
// [ALL TESTS]
}
}
};
int main() {
STATIC_ASSERT((test_in<instantiator, int>(), true));
test_in<instantiator, int>();
}When we add extra constraint to instantiator::call, which is negation of the condition in if constexpr statement:
struct instantiator {
template <ranges::input_range R>
requires (!move_constructible<R>)
static constexpr void call() {
if constexpr (move_constructible<R>) {
// [ALL TESTS]
}
}
};The test still passes, which means that the // [ALL TESTS] part is never executed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fixedSomething works now, yay!Something works now, yay!rangesC++20/23 rangesC++20/23 rangestestRelated to test codeRelated to test code