Daily bit(e) of C++ | std::as_const
Daily bit(e) of C++ #332, The C++17 utility for obtaining an immutable reference to an object: std::as_const.
std::as_const is a C++17 utility that simplifies const-casting, specifically the safe variant of adding a const qualifier.
Notably, this utility is more ergonomic in generic contexts than the standard const_cast.