Spec-Zone.ru › C++

std::basic_filebuf<CharT,Traits>::~basic_filebuf

virtual ~basic_filebuf();

Calls close() to close the associated file and destructs all other members of basic_filebuf. If an exception occurs during the destruction of the object, including the call to close(), it is caught and not rethrown.

Notes

Typically called by the destructor of std::basic_fstream.

Example

Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

DR Applied to Behavior as published Correct behavior
LWG 622 C++98 it was unclear how to handle the exception thrown during destruction it is caught but not rethrown

See also

(constructor)
constructs a basic_filebuf object
(public member function)
close
flushes the put area buffer and closes the associated file
(public member function)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/io/basic_filebuf/~basic_filebuf

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API