Consider the following piece of code:
#include <iostream>
struct Foo {
static int const i = i + 1;
};
int main() {
std::cout << Foo::i << std::endl;
}
Clang version 3.7 compiles this and outputs 1.
While GCC version 5.3 emits an error:
error: 'i' was not declared in this scope
Q:
Which one of the two compilers conforms to the C++ standard?