const-correctness in private API