online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <type_traits> template<class T> class Foo { public: Foo() = default; Foo(const Foo&) = default; Foo(Foo&&) = default; Foo& operator=(Foo&&) = default; Foo& operator=(const Foo&) = default; template<typename K, typename = typename std::enable_if_t<!std::is_same_v<T, K>>> Foo (Foo<K> const&) = delete; }; int main() { Foo<int> ff; Foo<int> gg(ff); //THIS WORKS //Foo<char> dd(ff); //THIS PRODUCES ERROR 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