This works without a const cast because the shared_reference is const, but it's a shared reference over a non-const memory. This is indeed the opposite of the intuition concerning what a const method should be....