On Fri, 22 Jul 2022 at 16:52, Patrick Palka via Libstdc++ <libstd...@gcc.gnu.org> wrote: > > The 11 and 10 partial backports of P2325R3, r11-9555-g92d612cccc1eec and > r10-10808-g22b86cdc4d7fdd, unnecessarily preserved some changes from the > paper that made certain views no longer default constructible, changes > which aren't required to reap the overall benefits of the paper and > which conflicted with the goal to maximize backwards compatibility with > pre-P2325R3 code. > > This patch reverts the problematic changes, specifically it relaxes > the constraints on various views' default constructors so that they > reflect only the requirements that were already implicitly imposed by > the NSDMIs of the view. Thus for example this patch retains the > default_initializable<_Vp> constraint on transform_view's default > constructor since its '_Vp _M_base = _Vp()' NSDMI already reflects this > constraint, and it removes the default_initializable<_Fp> constraint > since the corresponding member '__detail::__box<_Fp> _M_fun' doesn't > require default initializability (specializations of __box are always > default constructible). > > After reverting these changes, all static_asserts from p2325.cc that > verify lack of default constructibility now fail as expected, matching > the pre-P2325R3 behavior. > > Tested on x86_64-pc-linux-gnu, does this look OK for the 11 and 10 > branches?
OK for gcc-10 and gcc-11 (with the completed ChangeLog), thanks.