Q:

Define function outside template class that uses SFINAE? 

In bellow sample I want to define destructor in this case outside the class, none of the trillion syntaxes I tried so far works:
    template<typename OjectType,
        typename = std::enable_if_t<std::is_base_of_v<SomeClass, OjectType>>>
    class SampleClass
    {
    public:
        ~SampleClass();
    };

    // How to define this outside class? 
    template<typename ObjectType>
    SampleClass<ObjectType>::~SampleClass()
    {
    }

A:

You were close, you forgot to specify the second template parameter (without the default value):
template <typename ObjectType, typename Dummy>
SampleClass<ObjectType, Dummy>::~SampleClass()
{
    // ...
}

