The closest thing to Typeclasses in C++ are concepts, i.e. the set of semantic and syntactic requirements on template parameters.
As of C++17, concepts are not yet an actual language construct but are enforced by convention and normally only checked at template instantiation time (as opposed to definition time), although there are techniques that can be used to simulate more formal checking (archetypes, enableif, etc.).