mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-28 01:31:23 +00:00
* fix(cpp): handle variadic pack dependent lookup * fix(cpp): preserve helper calls in pack mixins --------- Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
55 lines
733 B
C++
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);
|
|
}
|