#include #include using namespace std; template void g(); template class wrapper { const T t; public: wrapper(const T& initial_t = T()): t(initial_t) {} friend void f(); friend void g(); template friend void h(); }; inline void f() {cout << wrapper().t << "\n";} template inline void g() {cout << wrapper().t << "\n";} template inline void h() {cout << U(wrapper().t) << "\n";} int main() { cout << boolalpha << fixed; f(); g(); g(); h(); h(); return EXIT_SUCCESS; }