Why is parameter not a constant expression? : <p>Could you please explain why this code doesn't compile?</p>

<pre><code>// source.cpp
constexpr const char* func(const char* s) { return s;}

constexpr bool find(const char *param) {
   constexpr const char* result = func(param);
   return (param == 0);
}

int main()
{
   constexpr bool result = find("abcde");
}
</code></pre>

<p>The compile command:</p>

<pre><code>$ g++ -std=c++14 source.cpp
</code></pre>

<p>I've tried gcc5.4 and gcc6.4. The error:</p>

<pre><code>source.cpp: In function ‘constexpr bool find(const char*)’:
source.cpp:5:46: error: ‘param’ is not a constant expression
 constexpr const char* result = func(param);
                                          ^
</code></pre>
