title: When std::fprintf(stderr,...) fails, does the operation has no effect or can write a little before fail?
body: <p>I have a C++11 program that uses <code>std::fprintf</code> to write to <code>stderr</code> as a log and debug info. I know <code>fprintf</code> can fail and return a negative value, but I can't found if the operation is atomic (if fails, has no effect) or it can write some part of the text and then fails (or any other side effect).</p>
  
  <p>The function that uses <code>fprintf</code> looks like this:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>void writeToConsole (std::string const &amp;message)
  {
      std::fprintf(stderr, "%s\n", message.c_str());
  }
  </code></pre>
  
  <p>I am developing using Clang and GCC on Linux (for now), but my question is more about the standard, so...</p>
  
  <h2>Question:</h2>
  
  <p>If <code>std::fprintf</code> fails, is still possible that some characters had been written to <code>stderr</code>? Is this behaviour a C/C++ standard or is implementation-defined?</p>
  
  <p>Even more, if <code>std::fprintf</code> fails, should I abort the program or can continue execution silently without side effects (other than impossibility of write to <code>stderr</code>)?</p>