use const memfun, don't use static_visitor because of a scope