const-correctness in public API