Quantcast
Channel: Blog Inventic.eu » g++
Viewing all articles
Browse latest Browse all 3

g++ error: expected primary-expression before > token

$
0
0

For g++ compiler is sometimes necessary to specify more typename / template keywords than for Visual Studio. This is one of examples.

To the following code it’s necessary to add template keyword:

TMemoryManager & memMngr = GetMemoryManager();
m_pObject = 
  memMngr.CreateObject<TObject>(this, m_pContainerOwner);

use

TMemoryManager & memMngr = GetMemoryManager();
m_pObject = 
  memMngr.template CreateObject<TObject>(this, m_pContainerOwner);

Viewing all articles
Browse latest Browse all 3

Trending Articles