比较 clang 3.4.2 和 gcc 4.9,以下代码哪个正确?
#include <iostream>
template<typename T>
struct SelfRec {
static const int value = SelfRec<T>::value;
};
int main() {
std::cout << SelfRec<int>::value << std::endl;
return 0;
}
clang 打印 0,gcc 给出典型的达到模板最大深度错误。