#include <iostream>
using MyUInt = unsigned int;
using MyLInt = long int;
template<class T>
struct myStruct {
using type = MyLInt;
};
template<>
struct myStruct<int> {
using type = MyUInt;
};
// define other mappings as needed...
template<class T>
using myStruct_t = typename myStruct<T>::type;
template<class T1, class T2 = myStruct_t<T1>>
T1 fn(const T2& arg){
std::cout<<"T2 is int: "<<std::is_same_v<T2, int><<std::endl; //prints true
std::cout<<"T2 is unsigned int: "<<std::is_same_v<T2, unsigned int><<std::endl; //prints false
return T1(arg);
}
int main() {
std::cout << fn<int>(1);
return 0;
}