online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <type_traits> class A {}; class B : public A {}; class X {}; class Y : public X {}; class Other {}; template <typename Param> void doStuff() { if constexpr (std::is_base_of_v<A, Param>) std::cout << "Base A" << std::endl; else if constexpr (std::is_base_of_v<X, Param>) std::cout << "Base X" << std::endl; else std::cout << "Something else" << std::endl; } int main() { doStuff<B>(); doStuff<Y>(); doStuff<Other>(); }

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