Given the following Dart code:
class B {}
mixin M0 on B {}
mixin M1 on B {}
class C extends B with M0, M1 {}
Is the following C++ code kind of what is going on under the hood of Dart mixins?
class B {};
template<class T>
class M0 : public T {
public: static_assert(std::is_base_of_v<B, T>);
};
template<class T>
class M1 : public T {
public: static_assert(std::is_base_of_v<B, T>);
};
class C : public M1<M0<B>> {};