title: For identical static_assert messages, should I rely on MACROS?
body: <p><a href="http://en.cppreference.com/w/cpp/language/static_assert" rel="nofollow">static_assert</a> has the following syntax, which states that a string literal is required.</p>
  
  <blockquote>
    <p>static_assert ( bool_constexpr , <strong>string literal</strong> );</p>
  </blockquote>
  
  <hr>
  
  <p>Since an <em>instance</em> of a string CAN'T be observed at compile time, the following code is invalid:</p>
  
  <pre><code>const std::string ERROR_MESSAGE{"I assert that you CAN NOT do this."};
  static_assert(/* boolean expression */ ,ERROR_MESSAGE);
  </code></pre>
  
  <hr>
  
  <p>I have static asserts all over my code, which say the same error message.
  Since a string literal is required, would it be best to replace all the repetitive string literals with a MACRO, or is there a better way?</p>
  
  <pre><code>// Is this method ok? 
  // Should I hand type them all instead?
  // Is there a better way?
  
  #define _ERROR_MESSAGE_ "danger"
  
  static_assert(/* boolean expression 1*/ ,_ERROR_MESSAGE_);
  //... code ...
  static_assert(/* boolean expression 2*/ ,_ERROR_MESSAGE_);
  //... code ...
  static_assert(/* boolean expression 3*/ ,_ERROR_MESSAGE_);
  </code></pre>