auto itr = mResourceMap.find( id ); // Which type has this iterator?
// I thought it would be of this, but it isn't.
std::map<Identifier,std::unique_ptr<Resource>>
::iterator itr = mResourceMap.find( id );
// mResourceMap is of type: std::map<Identifier,std::unique_ptr<Resource>>
ResourceHolder.hpp: In member function ‘const Resource& ResourceHolder<Resource, Identifier>::get(Identifier) const’:
ResourceHolder.hpp:53:5: error: need ‘typename’ before ‘std::map<Identifier, std::unique_ptr<_Tp> >::iterator’
because ‘std::map<Identifier, std::unique_ptr<_Tp> >’ is a dependent scope
std::map<Identifier,std::unique_ptr<Resource>>::iterator itr = mResourceMap.find( id );
^~~
ResourceHolder.hpp:53:62: error: expected ‘;’ before ‘itr’
std::map<Identifier,std::unique_ptr<Resource>>::iterator itr = mResourceMap.find( id );
^~~
In file included from /usr/include/c++/7/cassert:44:0,
from ResourceHolder.hpp:30,
from test.cpp:5:
ResourceHolder.hpp:54:13: error: ‘itr’ was not declared in this scope
assert (itr != mResourceMap.end() );