On Fri, 2007-04-27 at 14:46 -0400, Jerry Feldman wrote:
I have a case where the compiler is giving me an error: ./FOO.H: In member function Bar<ItemType>::operator()(ItemType&)': ./FOO.H:447: error: `i_key' was not declared in this scope
I think you need to use this->i_key instead of i_key. The logic is this. C++ looks up nondependent names like i_key as soon as they are encountered. But it can't find i_key because it is possible for you to create an explicit specialization of FuBar in which i_key is not of type ThisType const &. Using this->i_key delays name lookup to the point of instantiation of the class, by which time its type will be known for certain. -- JDL --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org