This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
make_integer_sequence currently uses template metaprogramming to generate a sequence of integers, which is fairly expensive at compile time: PR 80396 asked for some built-in to speed it up. This patch introduces __integer_pack as a magic function taking a single integer argument; a call to this function as the pattern of a pack expansion produces a list of integers which can be used as arguments to a template (or a function, but that's not the goal). Rather than introduce a new keyword, I decided to use a FUNCTION_DECL, which works fine. Tested x86_64-pc-linux-gnu, applying to trunk.
Attachment:
integer-pack4.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |