Curiously recurring template pattern: Difference between revisions

Content deleted Content added
No edit summary
Line 8:
};
 
Typically, the base class template will take advantage of the fact that member function bodies (definitions) are not instantiated until long after their declarations, and will use members of the derived class within its own member functions, via the use of a <code>static_cast</code>, or simply a cast e.g.:
 
template <class Derived>
Line 16:
{
// ...
static_cast<Derived*>(this)->.implementation();
// ...
}