https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112803
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:a9cfcd0d9e3780c71442057f636f62a7142056cb commit r15-7764-ga9cfcd0d9e3780c71442057f636f62a7142056cb Author: Jonathan Wakely <jwak...@redhat.com> Date: Thu Feb 27 15:48:49 2025 +0000 libstdc++: Add static_assertions to ranges::to adaptor factory [PR112803] The standard requires that we reject attempts to create a ranges::to adaptor for cv-qualified types and non-class types. Currently we only diagnose it once the adaptor is used in a pipeline. This adds static assertions to diagnose it immediately. libstdc++-v3/ChangeLog: PR libstdc++/112803 * include/std/ranges (ranges::to): Add static assertions to enforce Mandates conditions. * testsuite/std/ranges/conv/112803.cc: New test.