online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <type_traits> #include <iostream> template<typename... args_t> auto f(args_t&&... args) -> std::enable_if_t<(std::is_same_v<double,args_t> && ...),void> { std::cout << "All doubles\n"; } template<typename... args_t> auto f(int arg, args_t&&... args) -> std::enable_if_t<(std::is_same_v<double,args_t> && ...),void> { std::cout << "First one is an int the rest is all doubles\n"; } int main() { f(1.0,2.0,3.0); f(1,2.0,3.0); // f(1,2.f,3.0); // This one should not compile, there is a float argument in there 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