title: What does std::ofstream::close() actually do?
body: <p>This question: <a href="https://stackoverflow.com/questions/16267984/how-to-protect-log-from-application-crash">How to protect log from application crash?</a> has lead me to another - what does <code>std::ofstream::close()</code> actually do? I know it calls <code>flush()</code> and that's one thing. But what else? What closing the file actually is?</p>
  
  <p>Edit:
  Let me rephrase my question - <strong>is anything physically done to the actual file</strong> during the call to <code>close()</code> or is it just <code>std::ofstream</code> internal cleanup stuff?</p>