it is pretty much designed to be only used with legacy APIs that are not const correct i.e. with a function you can’t change that has non const interface but doesn’t actually mutate anything on the interface
More Related Contents:
- C++ 11: conversion const int* to int* using unordered_set::push
- Is const_cast safe?
- How to use const_cast?
- Is this undefined behavior with const_cast? [duplicate]
- Is it allowed to cast away const on a const-defined object as long as it is not actually modified?
- How to convert “pointer to pointer type” to const?
- C++: Why is const_cast evil?
- behavior of const_cast in C++ [duplicate]
- Strange behavior of const_cast [duplicate]
- Why does this tell me that "gender" is an undeclared identifier on line
- Can standard container templates be instantiated with incomplete types?
- Sort list using STL sort function
- What is a raw string?
- Can returning a local variable by value in C++11/14 result in the return value being constructed by rvalue when no copy/move is involved?
- constexpr static member before/after C++17
- What is C++ Mixin-Style?
- Can I delete[] a pointer that points into an allocated array, but not to the start of it?
- Does “undefined behaviour” extend to compile-time?
- Impact of cubic and catmull splines on image
- Spirit-Qi: How can I write a nonterminal parser?
- Which types on a 64-bit computer are naturally atomic in gnu C and gnu C++? — meaning they have atomic reads, and atomic writes
- Refreshing the auto complete (IntelliSense) database in Visual Studio
- What’s the difference between opening a file with ios::binary or ios::out or both?
- What is different between join() and detach() for multi threading in C++?
- Should you overload swap in the std namespace?
- When pass a variable to a function, why the function only gets a duplicate of the variable?
- what does const mean in c++ in different places
- Which one will execute faster, if (flag==0) or if (0==flag)?
- Why is a segmentation fault not recoverable?
- When virtual inheritance IS a good design?