#include #include using namespace std; bool inside(const bool& t1); int inside(const int& t1); double inside(const double& t1); template class wrapper { T t; public: wrapper(const T& initial_t = T()): t(initial_t) {} friend T outside(const T& t1); friend T inside(const T& t1) {return wrapper(t1).t;} }; inline bool outside(const bool& b) {return wrapper(b).t;} inline int outside(const int& i) {return wrapper(i).t;} inline double outside(const double& d) {return wrapper(d).t;} int main() { cout << boolalpha << outside(true) << "\n" << outside(10) << "\n" << outside(3.14) << "\n" << inside(true) << "\n" << inside(10) << "\n" << inside(3.14) << "\n"; return EXIT_SUCCESS; }