#include <iostream>
template <typename... Ts>
struct SourceLocation {
static constexpr const char* file = __FILE__;
static constexpr int line = __LINE__;
};
template <typename... Ts>
struct FoldSourceLocation {
static constexpr const char* file = (__VA_ARGS__::file, ...);
static constexpr int line = (__VA_ARGS__::line, ...);
};
int main() {
std::cout << "Source location: " << FoldSourceLocation<SourceLocation<int>, SourceLocation<double>, SourceLocation<std::string>>::file << ":" << FoldSourceLocation<SourceLocation<int>, SourceLocation<double>, SourceLocation<std::string>>::line << std::endl;
return 0;
}