Use the __make_integer_seq builtin, introduced by r252036, when available. This allows for an incredibly fast std::make_integer_sequence implementation.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
@majnemer Will the compiler emit diagnostics comparable to the static asserts in the other implementation?
Comment Actions
The only issue I have with this is that we should still test both code patchs with clang so we can ensure the fallback implementation remains correct. I would change
#if __has_builtin(__make_integer_seq) && !defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
Then add a test called test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.pass.cpp that contains:
#define _LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE #include "make_integer_seq.pass.cpp"
After that these changes LGTM. @K-ballo I'm happy to make the changes as I commit this if your OK with that?