[Bug libstdc++/102301] New: make_from_tuple can not work with subrange

hewillk at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Sep 13 03:54:25 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102301

            Bug ID: 102301
           Summary: make_from_tuple can not work with subrange
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

I don't know if it is a bug, because the standard does not specify whether
make_from_tuple can be applied to subrange even if it looks well-formed, so
this may only be regarded as a feature request. 

Given that MSVC-STL already supports it, I think it should have some value.

#include <ranges>
#include <vector>

int main() {
  auto v =
std::make_from_tuple<std::vector<int>>(std::ranges::subrange(std::views::iota(0,
5)));
}

https://godbolt.org/z/Ebx83z4s1


More information about the Gcc-bugs mailing list