unique_ptr header question

Chris Sherlock chris.sherlock79 at gmail.com
Mon Apr 24 09:59:02 UTC 2017


On 24 Apr 2017, at 5:43 pm, Stephan Bergmann <sbergman at redhat.com> wrote:
> 
>> 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.

So that might explain while it compiled fine on my Mac and the Mac buildbot, but not Windows or Linux... cheers!

Chris


More information about the LibreOffice mailing list