online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include<type_traits> #include<string> #include<vector> void SetString(std::string n) { std::cout<<"SetString called"<<std::endl; } template<class T> typename std::enable_if<!std::is_fundamental<T>::value>::type Function(const T& x) { SetString(x.GetString()); }; struct Name { std::string GetString() const { std::cout<<"Getstring called"<<std::endl; return name; } std::string name; }; int main() { //Function(5); //won't work because 5 is of type int Name n; Function(n); 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