Bug 40380 - class documentation should mention include file to use
class documentation should mention include file to use
Status: ASSIGNED
Product: gcc
Classification: Unclassified
Component: libstdc++
4.5.0
: P3 enhancement
: ---
Assigned To: Benjamin Kosnik
: documentation
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-08 21:36 UTC by Tom Tromey
Modified: 2012-05-02 22:56 UTC (History)
3 users (show)

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


Attachments

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:

http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00587.html

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:

http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-api-4.6/a01102.html

"
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>.