unique_ptr header question

Stephan Bergmann sbergman at redhat.com
Mon Apr 24 07:43:16 UTC 2017


On 04/24/2017 01:14 AM, Markus Mohrhard wrote:
> The patch that you referenced is correct and the code compiles because 
> header files are recursively included. So if any of the header files in 
> the include chain contains an "#include <memory> std::unique_ptr will be 
> available in that translation unit.

Another reason why a missing include of a standard library header may go 
unnoticed with some toolchains but not with others is that the standard 
allows C++ headers to include other C++ headers, so the relevant header 
may happen to be included indirectly through another header include.


More information about the LibreOffice mailing list