online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <type_traits> #include <vector> #include <string> #include <functional> #include <map> #include <algorithm> using namespace std; struct Custom { //overload operator() template<typename... Args> void operator()(const Args&...args) { std::cout << "operator() called with: "<<sizeof...(args)<<" arguments"<<std::endl; } }; template <class Something> void foo(Something s) { s(0, "--limit", "Limits the number of elements."); //call the overloaded operator() s(false, "--all", "Run all", 5.5, 5); //call the overloaded operator() } int main() { Custom c; //create object of class type Custom foo(c); //call foo by passing argument of type `Custom` }

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