Get deepest class in CRTP inheritance chain
I would like to know how to solve the following problem (C++17): suppose there are several template classes, inherited from each other in CRTP-like fashion (single inheritance only). For a given instantiated template base class, find the class that is furthest from it down the inheritance chain. I first thought that is should be pretty easy, but was not able to accomplish this. To simplify, suppose that every root and every intermediate class has using DerivedT = Derived in its public area. Example: template <class T> struct GetDeepest { using Type = ...; }; template <class T> struct A { using