I'm trying to achieve something like the following:
Logger::Instance() << "Something sent to log file" << std::endl;

If Instance() is defined as
Code:
Logger* Logger::Instance()
{
	return  m_pInstance ? m_pInstance : (m_pInstance = new Logger);
}
then the following
Code:
template<typename T>
    Logger& operator<<(T const& data)
    {
//fout is ofstream
          fout << data;
          return *this;
    }
results in
error C2296: '<<' : illegal, left operand has type 'Logger *'

This error make sense, but I can't think of a way around it. Can this type of effect be achieved?