mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-08-28 05:25:25 +00:00
* feat(cpp): SFINAE-aware overload filter — drops candidates whose enable_if_t / requires constraints fail (#1579) * fix(cpp): SFINAE follow-ups for is_integral_v/is_arithmetic_v bool and char support, an unqualified F1 test fixture, and parameter-lookup gap documentation (#1579) -> claude feedback * revert: reverting all changes to .md files
23 lines
637 B
C++
23 lines
637 B
C++
// Filter ordering: arity gate runs BEFORE constraint filter, so a
|
|
// bad-arity candidate is dropped even when its constraint would have
|
|
// returned 'unknown' (and thus kept it). Asserts exactly 1 CALLS edge
|
|
// to the good overload — guards the filter-step ordering invariant.
|
|
#include <type_traits>
|
|
|
|
template<class T>
|
|
constexpr bool MyCustomTrait_v = true;
|
|
|
|
template<class T, std::enable_if_t<MyCustomTrait_v<T>, int> = 0>
|
|
void process(T value) {
|
|
(void)value;
|
|
}
|
|
|
|
template<class T, std::enable_if_t<MyCustomTrait_v<T>, int> = 0>
|
|
void process(T value, T other) {
|
|
(void)value;
|
|
(void)other;
|
|
}
|
|
|
|
void run() {
|
|
process(42);
|
|
}
|