gcc compiles this code, but I'm a little concerned it's not strictly legal C++:
Anyone know?Code:#include <iostream> using namespace std; template <typename OutType, typename InType> OutType StaticCastWrapper(InType x) { return static_cast<OutType>(x); } int main() { cout << StaticCastWrapper<int>(5.3) << endl; return 0; }