Hello all,
I am a bit stumped by a compile fault..
This is a fragment of the code
template<typename T>
void LCLogSource<T>::SetLoggers(std::map > &LogMap)
{
typedef std::map >
handlerMap ;
for (handlerMap::iterator pos = LogMap.begin(); pos != LogMap.end();
++pos) // **** compile error here
{
yada yada
I get a compile fault on the for line, 'expected ; before pos'.
Now this fault has only started happening since I decided to template this
class. It appears that the combination of the template, and the complexity
of the map declaration is causing things to go awry, and I don't know why. I
have tried a few alternatives but always get a problem of some description.
Is there some reason I cannot use iterators on a stl::map where the map key
defn. depends on the template parameter?
In case this is nothing to do with the shared_ptr in the map, does anyone
have a list where templates programming is discussed so I can post there?
James