#include <iostream>
template <class T, class U>
int f(T t, U)
{
U a(t);
return a;
}
struct S {
unsigned char a:3;
unsigned char b:2;
};
int main()
{
S s;
s.a = 7;
std::cout << int(s.a) << '\t' << f(s.a, s.b) << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGUgPGNsYXNzIFQsIGNsYXNzIFU+CmludCBmKFQgdCwgVSkKewogICAgVSBhKHQpOwogICAgcmV0dXJuIGE7Cn0KCnN0cnVjdCBTIHsKICAgIHVuc2lnbmVkIGNoYXIgYTozOwogICAgdW5zaWduZWQgY2hhciBiOjI7Cn07CgppbnQgbWFpbigpCnsKICAgIFMgczsKICAgIHMuYSA9IDc7CiAgICBzdGQ6OmNvdXQgPDwgaW50KHMuYSkgPDwgJ1x0JyA8PCBmKHMuYSwgcy5iKSA8PCBzdGQ6OmVuZGw7Cn0K