Example: Is this legal C++14?
#include <iostream>
static int d() {
return 42;
}
static int e(int d = d()) {
return d;
}
int main() {
std::cout << e() << " " << e(-1) << std::endl;
}
g++ 5.4 with -std=c++14
likes it, but clang++ 3.8 with -std=c++14
complains:
samename.cxx:3:23: error: called object type 'int' is not a function or function pointer
static int e(int d = d()) {return d;}
~^