Curiously recurring template pattern: Difference between revisions

Content deleted Content added
Audrius u (talk | contribs)
m fixed variable types in 'object counter' sample
Audrius u (talk | contribs)
m Fixed variable types in 'Object counter' code sample
Line 71:
--objects_alive;
}
static unsigned longint objects_created;
static unsigned longint objects_alive;
};
template <typename T> unsigned longint counter<T>::objects_created( 0 );
template <typename T> unsigned longint counter<T>::objects_alive( 0 );
 
class X : counter<X>