Use of uninitialised value of size 8
问题 I'm having a quite strange problem with the fwd_iterator that I'm implementing: if I use the iterators in methods defined inside the class, they work, but if I create a method with global scope in which I use iterators, valgrind says that I'm attempting to access to uninitialised memory. It seems like iterators created outside the class cannot read a private attribute of the class (even with public methods created to do this). This is the global-scope method: template<typename T, class Pred>