New WG21 papers are available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.
Document number: N4388
Date: 2015-02-25
A Proposal to Add a Const-Propagating Wrapper to the Standard Library
by Jonathan Coe, Robert Mill
Excerpt:
We propose the introduction of a
propagate_const
wrapper class that propagatesconst
-ness to pointer-like member variables. ... The behaviour ofconst
member functions on objects with pointer-like data members is seen to be surprising by many experienced C++ developers. Aconst
member function can call non-const
functions on pointer-like data members and will do so by default without use ofconst_cast
...
Add a Comment
Comments are closed.