summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/include/utility4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/include/utility b/libcxx/include/utility
index a57e17b3687..8b376615f1d 100644
--- a/libcxx/include/utility
+++ b/libcxx/include/utility
@@ -744,7 +744,9 @@ struct __make_integer_sequence
static_assert(is_integral<_Tp>::value,
"std::make_integer_sequence can only be instantiated with an integral type" );
static_assert(0 <= _Ep, "std::make_integer_sequence must have a non-negative sequence length");
- typedef __make_integer_sequence_unchecked<_Tp, _Ep> type;
+ // Workaround GCC bug by preventing bad installations when 0 <= _Ep
+ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68929
+ typedef __make_integer_sequence_unchecked<_Tp, 0 <= _Ep ? _Ep : 0> type;
};
#endif
OpenPOWER on IntegriCloud