Consider the following module:
module M;
// a private, non-exporting function
int id(int x) {
return x;
}
export
template <class T>
int f(T x) {
return id(0);
}
export
int g(int y) {
return id(1);
}
And the following C++ code using it:
import M;
int main() {
g(42);
return 0;
}
It successfully compiles with VS2015 update 1 and works, but if I replace g
with f
, the compiler complains: error C3861: 'id': identifier not found
.
How to fix it?