[doc] Fix the parameter names documented for is_permutation - #131
Conversation
The three-argument overload documents `\param last2`, but its parameters are `first1`, `last1`, `first2` — `last2` is a local variable computed inside the body. The four-argument overload right above it documents `last1` correctly. Both `\fn` lines also spell the first two parameters `first` and `last` while the declarations use `first1` and `last1`.
|
You should prepare a PR for boost.GIL. I can fix the string one myself. |
|
Thanks for merging. Two corrections to the numbers I quoted in the description, before you act on them. I wrote that Boost.GIL has 42 such mismatches and Boost.Histogram 25. Both came from an early version of my checker that mis-parsed GIL is done: Mateusz merged boostorg/gil#792 this morning, which covered the core headers, and I have just sent boostorg/gil#793 for Histogram is at boostorg/histogram#443, three Leaving |
The three-argument
is_permutationoverload documents a parameter it does not have:last2is not a parameter — it is a local variable computed inside the body (ForwardIterator2 last2 = first2; std::advance(...)), which is presumably how it got into the comment. The four-argument overload twenty lines above documentslast1correctly, so the two overloads describe the same parameter differently.Both
\fnlines in the file also spell the first two parametersfirstandlast, while the declarations usefirst1andlast1. Doxygen matches\fnagainst the declaration, so those names should agree too.Comments only, one file.
Found while sweeping, not included
The same check — every
\param/\tparamname in a Doxygen block against the actual signature — turns up a few more in this library and its neighbours:boost/algorithm/string/formatter.hpp,empty_formatterdocuments\param Inputwhile the parameter in the declaration is unnamed (empty_formatter(const RangeT&)).\paramnames that were renamed in the signature.I kept this PR to
is_permutation. If the rest is worth fixing, say so in a comment and I will send them — per library, so each stays reviewable — or tell me a given one is intentional and I will leave it alone.