title: C++ check if statement can be evaluated constexpr
body: <p>Is there a method to decide whether something can be constexpr evaluated, and use the result as a constexpr boolean? My simplified use case is as follows:</p>
  
  <pre><code>template &lt;typename base&gt;
  class derived
  {
      template&lt;size_t size&gt;
      void do_stuff() { (...) }
  
      void do_stuff(size_t size) { (...) }
  public:
      void execute()
      {
          if constexpr(is_constexpr(base::get_data())
          {
              do_stuff&lt;base::get_data()&gt;();
          }
          else
          {
              do_stuff(base::get_data());
          }
      }
  }
  </code></pre>
  
  <p>My target is C++2a.</p>
  
  <p>I found the following reddit thread, but I'm not a big fan of the macros. <a href="https://www.reddit.com/r/cpp/comments/7c208c/is_constexpr_a_macro_that_check_if_an_expression/" rel="noreferrer">https://www.reddit.com/r/cpp/comments/7c208c/is_constexpr_a_macro_that_check_if_an_expression/</a></p>