online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <stdio.h> #include <type_traits> struct B { virtual int foo() { puts("B"); }; template<typename X> using baseFooType = typename std::enable_if<X::override_foo,decltype(((B*)nullptr)->foo())>::type; }; struct C : public B { constexpr static bool override_foo = true; }; struct D : public B { constexpr static bool override_foo = true; }; struct E : public C { baseFooType<C> foo() override { puts("E"); } }; struct F : public D { baseFooType<D> foo() override { puts("F"); } }; int main() { E().foo(); F().foo(); }

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