online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#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){ return T1(arg); } int main() { std::cout << fn<int>(1); std::cout << fn<double>(1); return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue