Why compiling with C++11 is successful despite using C++14 feature?
<p>GCC v6.1 (the result is the same with v5.1) successfully compiles the code below with flags <code>-std=c++11 -Wall -Wextra -Wpedantic</code>, but produces this warning:</p>

<pre><code>variable templates only available with -std=c++14 or -std=gnu++14
</code></pre>

<p>The code:</p>

<pre><code>#include &lt;iostream&gt;

template &lt;typename T&gt;
struct ParamMetadata {
        T min;
        T max;
};

template &lt;class T1, class T2&gt;
class FooMap {};

template &lt;typename T&gt;
// WARNING PRODUCED ON THIS LINE
extern FooMap&lt;int, ParamMetadata&lt;T&gt; &gt; metadataHashmap;

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

<p>Clang v3.8 produces a similar warning:</p>

<pre><code>variable templates are a C++14 extension [-Wc++14-extensions]
</code></pre>

<p>If this is a feature only available in C++14, why does it compile with C++11 flag just fine  and I can run the executable? Shouldn't it be a fatal error?</p>