pw_polyfill: std::integer_sequence, std::to_array

- Implement std::integer_sequence for C++11.
- Implement C++20's std::to_array.
- Define feature test macros when the features are defined.

Change-Id: Idd7f34496fe6fe273c3ecd2a9458a62416e38eb2
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/16961
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
diff --git a/pw_polyfill/language_features.h b/pw_polyfill/language_features.h
index 0a0e5cb..2fc7a2a 100644
--- a/pw_polyfill/language_features.h
+++ b/pw_polyfill/language_features.h
@@ -46,6 +46,8 @@
 // so the static_assert arguments are passed to an overloaded C++ function. The
 // full stringified static_assert arguments are used as the message.
 #if __cpp_static_assert < 201411L
+#undef __cpp_static_assert
+#define __cpp_static_assert 201411L
 
 #define static_assert(...)                                                     \
   static_assert(::pw::polyfill::internal::StaticAssertExpression(__VA_ARGS__), \