What is wrong with this implementation in header file?
template
class Singleton
{
public:
static T* getInstance()
{
if (m
Pointers are being initialized to NULL by standard, why I need to explicitly initialize?
You don't need.
template
T* Singleton::m_instance;
This will suffice as static & global variables are zero initialized by default
Variables with static storage duration (3.7.1) or thread storage duration (3.7.2) shall be zero-initialized (8.5) before any other initialization takes place.