Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18-28] Fix index entry for constructors #740

Merged

Conversation

AlisdairM
Copy link
Contributor

The preferred way to list constructors in the index is under the
non-code font term 'constructor', but many classes retain old
text that lists the constructor under the class name as the same
class name, in a code font. Worse, there are quite a few classes
that have fallen into a hybrid approach, with both listings, which
can be confusing. This change-set should catch every constructor
indexed in the old style and consistently transform it to the new.

One additional fix is that allocator_traits mis-indexed the static
member functions 'construct' and 'destroy' as the plain-text
constructor and destructor. This patch correctly indexes them as
their correct name, in a code-font.

@AlisdairM
Copy link
Contributor Author

Two particular features I will call attention to:

  1. The constructor for the 'ios_base' nested classes now have their classes qualified with 'ios_base::'. Previously the qualifier was only on the constructor, so that the unqualified name also gained a place in the index. I think this form is preferred, but my judgement is suspect!
  2. many index entries have a trailing '%' after the closing '}', but many do not. I don't really know LaTeX, so I left these entries as I found them - although I suspect there may be a desire to make this convention consistent one way or the other. I observed no clear distinction for when the '%' was present or absent.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 9, 2016

@AlisdairM If it's after the closing brace, then it's not part of the index. The % is the line-comment character for LaTeX, and putting it at the end of the line means that there is no whitespace. Without it, the newline counts as a whitespace. To see the effect, look for where the index macro sits in the body text and see if there's too much space; that may be a sign that you need to comment out the newline.

The preferred way to list constructors in the index is under the
non-code font term 'constructor', but many classes retain old
text that lists the constructor under the class name as the same
class name, in a code font.  Worse, there are quite a few classes
that have fallen into a hybrid approach, with both listings, which
can be confusing. This change-set should catch every constructor
indexed in the old style and consistently transform it to the new.

One additional fix is that allocator_traits mis-indexed the static
member functions 'construct' and 'destroy' as the plain-text
constructor and destructor.  This patch correctly indexes them as
their correct name, in a code-font.
@AlisdairM AlisdairM force-pushed the fix_constructors_in_library_index branch from 87fcdb9 to 05521fa Compare June 9, 2016 11:17
@AlisdairM
Copy link
Contributor Author

Rebases and conflicts resolved - apparently you can't make edits to adjacent lines in different branches without confusing the diff algorithm. Manually reviewed diff to confirm rebase did not do anything unexpected - ready for review again.

@jwakely jwakely merged commit edd0a00 into cplusplus:master Jun 9, 2016
@AlisdairM AlisdairM deleted the fix_constructors_in_library_index branch June 9, 2016 13:16
@jwakely
Copy link
Member

jwakely commented Jun 9, 2016

I also fixed scoped_allocator_adaptor::destroy which was indexed as "destructor".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants