Using non-exporting functions inside templates in C++ modules
<p>Consider the following module:</p>

<pre><code>module M;

// a private, non-exporting function
int id(int x) {
    return x;
}

export
template &lt;class T&gt;
int f(T x) {
    return id(0);
}

export
int g(int y) {
    return id(1);
}
</code></pre>

<p>And the following C++ code using it:</p>

<pre><code>import M;

int main() { 
    g(42);
    return 0; 
}
</code></pre>

<p>It successfully compiles with VS2015 update 1 and works, but if I replace <code>g</code> with <code>f</code>, the compiler complains: <code>error C3861: 'id': identifier not found</code>.</p>

<p>How to fix it?</p>