Bug 44015 - template parameters not documented
template parameters not documented
Status: ASSIGNED
Product: gcc
Classification: Unclassified
Component: libstdc++
unknown
: P3 normal
: 4.8.3
Assigned To: Benjamin Kosnik
: documentation
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-06 17:36 UTC by Christopher Yeleighton
Modified: 2013-10-16 09:49 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 Christopher Yeleighton 2010-05-06 17:36:01 UTC
Reading the page "std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference" [1]:

The template parameters are not documented; in particular, their default assignments are not mentioned. 

[1] <URL:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00260.html#_details>
Comment 1 Paolo Carlini 2010-05-06 17:39:32 UTC
Let's add Benjamin for this one too.

Are you sure the template parameters and the defaults are documented for *all* the other classes besides basic_string? Seems really weird.
Comment 2 Jonathan Wakely 2010-05-06 19:44:40 UTC
basic_stringstream etc. are missing docs for their default template arguments too, I think it's because the doxygen comments are on the class template definitions, not on the forward declarations in <iosfwd> and <bits/stringfwd.h>, and the default parameters are only defined in the forward declarations.

For types, such as vector, with no forward declaration the default template args are documented by doxygen

Comment 3 Benjamin Kosnik 2012-05-02 22:25:36 UTC
Author: bkoz
Date: Wed May  2 22:25:28 2012
New Revision: 187066

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187066
Log:
2012-05-02  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/44015
	* include/bits/basic_ios.h: Add tparam markup for
	* doxygen.  include/bits/basic_string.h: Same.
	* include/bits/forward_list.h: Same.
	* include/bits/stl_bvector.h: Same.
	* include/bits/stl_deque.h: Same.
	* include/bits/stl_list.h: Same.  include/bits/stl_map.h:
	* Same.  include/bits/stl_multimap.h: Same.
	* include/bits/stl_multiset.h: Same.
	* include/bits/stl_pair.h: Same.
	* include/bits/stl_queue.h: Same.
	* include/bits/stl_set.h: Same.
	* include/bits/stl_stack.h: Same.
	* include/bits/stl_vector.h: Same.
	* include/bits/unordered_map.h: Same.
	* include/bits/unordered_set.h: Same.  include/std/array:
	* Same.  include/std/atomic: Same.  include/std/fstream:
	* Same.  include/std/istream: Same.  include/std/ostream:
	* Same.  include/std/sstream: Same.
	* include/std/streambuf: Same.
	* testsuite/23_containers/deque/requirements/dr438/*:
          Adjust line numbers.
	* testsuite/23_containers/list/requirements/dr438/*: Same.
	* testsuite/23_containers/vector/requirements/dr438/*: Same.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/basic_ios.h
    trunk/libstdc++-v3/include/bits/basic_string.h
    trunk/libstdc++-v3/include/bits/forward_list.h
    trunk/libstdc++-v3/include/bits/stl_bvector.h
    trunk/libstdc++-v3/include/bits/stl_deque.h
    trunk/libstdc++-v3/include/bits/stl_list.h
    trunk/libstdc++-v3/include/bits/stl_map.h
    trunk/libstdc++-v3/include/bits/stl_multimap.h
    trunk/libstdc++-v3/include/bits/stl_multiset.h
    trunk/libstdc++-v3/include/bits/stl_pair.h
    trunk/libstdc++-v3/include/bits/stl_queue.h
    trunk/libstdc++-v3/include/bits/stl_set.h
    trunk/libstdc++-v3/include/bits/stl_stack.h
    trunk/libstdc++-v3/include/bits/stl_vector.h
    trunk/libstdc++-v3/include/bits/unordered_map.h
    trunk/libstdc++-v3/include/bits/unordered_set.h
    trunk/libstdc++-v3/include/std/array
    trunk/libstdc++-v3/include/std/atomic
    trunk/libstdc++-v3/include/std/fstream
    trunk/libstdc++-v3/include/std/istream
    trunk/libstdc++-v3/include/std/ostream
    trunk/libstdc++-v3/include/std/sstream
    trunk/libstdc++-v3/include/std/streambuf
    trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
Comment 4 Benjamin Kosnik 2012-05-02 22:41:44 UTC
I noticed this again recently, while mucking with std::unordered_set etc.

The checked-in patch adds in the necessary markup for containers and io. It seems complete and consistent:

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

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

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

etc.

This is the way to write the markup for template parameters, and default arguments to them.
Comment 5 Jakub Jelinek 2013-03-22 14:41:45 UTC
GCC 4.8.0 is being released, adjusting target milestone.
Comment 6 Jakub Jelinek 2013-05-31 10:57:27 UTC
GCC 4.8.1 has been released.
Comment 7 Jakub Jelinek 2013-10-16 09:49:50 UTC
GCC 4.8.2 has been released.