mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-05 02:43:32 +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
20 lines
499 B
C++
20 lines
499 B
C++
// SFINAE via C++20 `requires` clause (F4 AST shape from #1579).
|
|
// Same logical disambiguation as cpp-sfinae-golden — proves the
|
|
// constraint-extractor recognizes the requires-clause shape, not just
|
|
// `enable_if_t<>` defaults.
|
|
#include <type_traits>
|
|
|
|
template<class T> requires std::is_integral_v<T>
|
|
void process(T value) {
|
|
(void)value;
|
|
}
|
|
|
|
template<class T> requires std::is_floating_point_v<T>
|
|
void process(T value) {
|
|
(void)value;
|
|
}
|
|
|
|
void run() {
|
|
process(42);
|
|
process(3.14);
|
|
}
|