User account creation filtered due to spam.

Bug 40380 - class documentation should mention include file to use
Summary: class documentation should mention include file to use
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.5.0
: P3 enhancement
Target Milestone: ---
Assignee: Benjamin Kosnik
Keywords: documentation
Depends on:
Reported: 2009-06-08 21:36 UTC by Tom Tromey
Modified: 2016-01-17 07:04 UTC (History)
4 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2012-05-02 00:00:00


Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2009-06-08 21:36:03 UTC
I was reading the documentation for unique_ptr:

This mentions unique_ptr.h -- but that is not a user-allowed header file.
Instead the user ought to write "#include <memory>".  This is not mentioned
anywhere, but IMO it should be.
Comment 1 Benjamin Kosnik 2009-06-18 00:00:26 UTC
Agreed. Thanks for the feedback on docs. Will put this on the docs todo list.
Comment 2 Benjamin Kosnik 2009-06-18 00:34:12 UTC
Add documentation keyword
Comment 3 Benjamin Kosnik 2012-05-02 22:56:37 UTC
Just an update on this. From 4.6.0 onward, the file documentation for things like bits/unique_ptr.h now have forwarding text:

Detailed Description

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <memory>.

Definition in file unique_ptr.h.

I think this is useful, but not as useful as saying that to use std::unique_ptr one needs to include <memory>.