Bug 125247 - Headers that use std::unique_ptr should #include <memory>
Summary: Headers that use std::unique_ptr should #include <memory>
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-04 13:04 PST by Brian Burg
Modified: 2013-12-04 23:17 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2013-12-04 13:04:27 PST
This needs to go into the style guide and style checker if it is something we want to encourage going forward.
Comment 1 Darin Adler 2013-12-04 18:07:14 PST
I don’t agree that this belongs in the style guide.

This follows the general rule that headers that use something need to include the file that something is defined in. I wouldn’t make a style rule for each thing.

Why is it OK to use std::unique_ptr without including <memory>? Because <memory> is included in "config.h" perhaps?
Comment 2 László Langó 2013-12-04 23:16:56 PST
I agree with Darin. This doesn't belong in the style guide. But this just an opinion. :)