This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

[PATCH] Use built-in for std::make_integer_sequnce


I forgot to commit this patch at the start of stage 1 when Jason added
the __integer_pack builtin.

This patch uses __has_builtin to detect Clang's __make_integer_seq
builtin and uses that instead when available. This means it works with
either __integer_pack or __make_integer_seq. whichever is available.

We _could_ keep the old implementation, for compilers that don't
support either builtin (I'm not sure if Intel icc supports either) but
I haven't done that here.

	* include/std/utility (_Itup_cat, _Make_integer_sequence): Remove.
	(_Build_index_tuple, make_integer_sequence): Use built-in to generate
	pack expansion.

Tested powerpc64le-linux, committed to trunk.


Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]