prog.cpp: In instantiation of ‘class Base<Derived>’:
prog.cpp:20:24: required from here
prog.cpp:10:17: error: invalid use of incomplete type ‘class Derived’
virtual float getFloat(const typename D::ExampleType* ex) const = 0;
^~~~~~~~
prog.cpp:20:7: note: forward declaration of ‘class Derived’
class Derived : public Base<Derived> {
^~~~~~~
prog.cpp:22:11: error: ‘ExampleType’ does not name a type
typedef ExampleType = Example;
^~~~~~~~~~~
prog.cpp:23:17: error: ‘virtual float Derived::getFloatImpl(const Example*)’ marked ‘override’, but does not override
virtual float getFloatImpl(const Example* ex) override {
^~~~~~~~~~~~
prog.cpp: In instantiation of ‘float Base<D>::getFloat(const FeaturesExample&) const [with D = Derived]’:
prog.cpp:30:30: required from here
prog.cpp:12:8: error: no type named ‘ExampleType’ in ‘class Derived’
get(reinterpret_cast<typename D::ExampleType>(&ex));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:12:7: error: ‘get’ was not declared in this scope
get(reinterpret_cast<typename D::ExampleType>(&ex));
~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~