N4388: A Proposal to Add a Const-Propagating Wrapper to the Standard Library -- J Coe, R Mill
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_constwrapper class that propagatesconst-ness to pointer-like member variables. ... The behaviour ofconstmember functions on objects with pointer-like data members is seen to be surprising by many experienced C++ developers. Aconstmember function can call non-constfunctions on pointer-like data members and will do so by default without use ofconst_cast...

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:
The C
While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature: