#include <iostream>
#include <type_traits>
#include <vector>
#include <string>
#include <functional>
#include <map>
#include <algorithm>
#include <sstream>
#include <set>
#include <unordered_map>
using namespace std;
// Forwarding chain: SZug.zug() -> baz() -> foo().
template <typename T1, typename T2>
void foo(T1 v1, T2 v2); // This is overloaded by SFyp
template <typename T1, typename T2>
void baz(T1 v1, T2 v2)
//----vv---------------------->replaced foo with ::foo
{ ::foo(v1, v2); }
template <typename T1>
struct SZug
{
template <typename T2>
void zug(T2 v2)
{
T1 v1;
baz(v1, v2);
}
};
// SFyp overload of foo().
struct SFyp{};
template <typename T2>
void foo(SFyp fyp, T2 v2)
{}
// Test.
int main()
{
SZug<SFyp> z;
z.zug(1);
}