This is the revised version of my patch incorporating the provided feedback from Patrick Palka and Jonathan Wakely. This patch fixes GCC Bug 108760: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108760 I moved out_value_result to , moved std::ranges:iota into , removed my new test, and moved and renamed the existing test. I built my local version of gcc using the following configuration: $ ../gcc/configure --disable-bootstrap --prefix="$(pwd)/_pfx/" --enable-languages=c,c++,lto I then ran $ make -jN and $ make -jN install Using the locally installed version, the following code compiled: https://godbolt.org/z/33EPeqd1b I tested my changes by running: $ make check-c++ -jN -k I personally found it difficult to understand the results of running the tests. I ran this on the following OS: Virtualization: wsl Operating System: Ubuntu 20.04.6 LTS Kernel: Linux 5.15.146.1-microsoft-standard-WSL2 Architecture: x86-64 From: Michael Levine (BLOOMBERG/ 731 LEX) At: 04/17/24 14:24:24 UTC-4:00To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] libstdc++: Fix std::ranges::iota is not included in numeric [PR108760] This patch fixes GCC Bug 108760: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108760 Before this patch, using std::ranges::iota required including when it should have been sufficient to only include . When the patch is applied, the following code will compile: https://godbolt.org/z/33EPeqd1b I added a test case for this change as well. I built my local version of gcc using the following configuration: $ ../gcc/configure --disable-bootstrap --prefix="$(pwd)/_pfx/" --enable-languages=c,c++,lto and I tested my changes by running: $ make check-c++ -jN -k I ran this on the following OS: Virtualization: wsl Operating System: Ubuntu 20.04.6 LTS Kernel: Linux 5.15.146.1-microsoft-standard-WSL2 Architecture: x86-64