https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80396
Bug ID: 80396
Summary: New builtin to make std::make_integer_sequence
efficient and scalable
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
Clang has a builtin used for implementing std::make_integer_sequence, so it
scales to much larger sequences than libstdc++'s pure C++ implementation.
The builtin seems to be undocumented, but behaves as though it is an alias
template of the form:
template<template<typename U, U...> class IntSeq, typename T, T N>
using __make_integer_seq = IntSeq<T, T(0), T(1), ..., T(N-1)>;
i.e. it instantiates IntSeq with arguments T and zero or more values of type T,
with monotonically increasing values from 0 to N-1.
Presumably T must be an integral type.
This would help libstdc++, and should avoid problems like PR 80387.