Yes, friend functions can access both private and protected members of a class in C++. They are not restricted to accessing only one type of member.