[BGL] how to use visitor with functor?