The const type qualifier is one of the jewels of the C++ language design. Surrounding by this feature, we devise the "const correctness" practice to prevent const objects from getting mutated. Unfortunately, due to short-sightedness, the standard library type std::function becomes one of the ill-behaved citizens that doesn't follow the const-correctness rule.