title: Assertion thrown in Release but not debug - necessarily a compiler bug?
body: <p>This is not a specific question about my code but a more high level question.</p>
  
  <p>I have C++ code that compiles in Release and Debug mode (both with assertions turned on)</p>
  
  <p>There is no code in the library that checks for Debug etc (via prerocsssor definitions or macros).</p>
  
  <p>Running in debug mode doesn't cause any assertions. Running in Release or RelWithDebInfo throws an assertition every time. </p>
  
  <p>Does this necessarily mean that there is a bug in the MSVC compiler/optimiser? Also, more generally: does a difference in program behaviour between Release and Debug always constitute a bug in the compiler. </p>
  
  <p>Note: clang run this code fine without throwing assertions in Release and Debug.</p>