mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-11 22:53:04 +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
27 lines
817 B
C++
27 lines
817 B
C++
// Monotonicity contract: unknown predicates keep both candidates.
|
|
// `MyCustomTrait_v` is NOT in the Tier-A registry, so both overloads'
|
|
// constraint check returns 'unknown' → both survive narrowing → fall
|
|
// through to `isOverloadAmbiguousAfterNormalization` (both have
|
|
// parameterTypes=['T']) → edge suppressed.
|
|
//
|
|
// Asserts CALLS.length === 0 — adding a predicate must never produce a
|
|
// wrong edge; the worst case is the pre-existing "degrade not lie"
|
|
// suppression.
|
|
#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) {
|
|
(void)value;
|
|
}
|
|
|
|
void run() {
|
|
process(42);
|
|
}
|