#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;
}