try to solve compilation issue on friend function