I have the following function defined in a header file :
uint32_t get_id(void) const { return m_id; }
I want to enforce a rule that whichever function calls the above function should add constantness to the value returned , as in :
const uint32_t = const_cast(get_id);
Is that possible in C++ ?