title: Are there drawbacks to using [[maybe_unused]] for variables used only in asserts?
body: <p>If a variable is only used in an <code>assert</code>, then compilers usually produce a warning when the program is compiled in release mode (i.e. without debug flags). <a href="https://stackoverflow.com/questions/1486904/how-do-i-best-silence-a-warning-about-unused-variables">This question</a> suggests ways to disable these particular warnings. Among the answers, the C++17 attribute <code>maybe_unused</code> is suggested. However, these answers have not really been discussed.</p>
  
  <p><strong>Are there any drawbacks to using <code>[[maybe_unused]]</code> in situations like this one</strong></p>
  
  <pre><code>[[maybe_unused]] const auto i = get_i();
  assert(i == 5);
  </code></pre>
  
  <p>in order to silence the warning about <code>i</code> being unused in a release build?</p>