static_assert(DI[2] == 30, "");
static_assert(DI[3] == 40, "");
-/// FIXME: The example below tests ImplicitValueInitExprs, but we can't
-/// currently evaluate other parts of it.
-#if 0
+constexpr int addThreeElements(const int v[3]) {
+ return v[0] + v[1] + v[2];
+}
+constexpr int is[] = {10, 20, 30 };
+static_assert(addThreeElements(is) == 60);
+
struct fred {
char s [6];
int n;
};
struct fred y [] = { [0] = { .s[0] = 'q' } };
-#endif
#pragma clang diagnostic pop
namespace indices {