online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <type_traits> template <typename T> inline constexpr bool is_char_v = std::is_same_v<T,char> || std::is_same_v<T,wchar_t> || std::is_same_v<T,char16_t> || std::is_same_v<T,char32_t>; template<typename T> inline constexpr bool is_arithmetic_not_char = std::is_arithmetic_v<T> && !is_char_v<T>; template<typename A, typename B> double sum(A a, B b) { if constexpr (is_arithmetic_not_char<A> && is_arithmetic_not_char<B>) return a + b; else return 0; } int main() { std::cout << sum(10, 65) << std::endl; std::cout << sum(10, 'A') << std::endl; 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