GitNexus/gitnexus/test/fixtures/lang-resolution/cpp-variadic-dependent-resolution/main.cpp
azizur100389 d5514f5cb3
fix(cpp): handle variadic pack dependent lookup (#1909)
* fix(cpp): handle variadic pack dependent lookup

* fix(cpp): preserve helper calls in pack mixins

---------

Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
2026-05-30 19:19:56 +01:00

55 lines
733 B
C++

struct B {
void inherited();
};
void sink(int value);
void ambiguous(int value);
void ambiguous(double value);
void helper();
namespace tools {
void namespaceHelper();
}
using tools::namespaceHelper;
template <class... Ts>
void logMany(int, Ts... xs) {
(sink(xs), ...);
}
template <class... Ts>
void foldAmbiguous(Ts... xs) {
(ambiguous(xs), ...);
}
template <class... B>
struct Mix : B... {
void run() {
inherited();
helper();
namespaceHelper();
}
};
template <class T>
struct Current {
void own();
void run() {
own();
}
};
template <class T>
struct UnknownSpecialization {
typename T::value_type value;
void run() {
value.use();
}
};
void callVariadic() {
logMany(1, 2, 3);
}