Bug 51539 - multiplies ::operator () undocumented
Summary: multiplies ::operator () undocumented
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.5.1
: P3 trivial
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/onlinedocs/libstdc...
Keywords: documentation
Depends on:
Blocks:
 
Reported: 2011-12-13 22:22 UTC by Christopher Yeleighton
Modified: 2011-12-13 23:35 UTC (History)
0 users

See Also:
Host: i586-suse-linux
Target: i586-suse-linux
Build: i586-suse-linux
Known to work:
Known to fail:
Last reconfirmed: 2011-12-13 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Yeleighton 2011-12-13 22:22:42 UTC
Returns the product of its operands, 
that is the result of operator * applied to them.
Comment 1 Jonathan Wakely 2011-12-13 23:12:47 UTC
It returns x*y, which may or may not be the product, the binary operator* could be overloaded for Tp with a completely different meaning.

Actually I'm wondering if it's worth adding anything here.  What else is multiplies going to do, except multiply?  There's already a link to a page saying all the arithmetic operations have corresponding functors, it should be self-explanatory.
Comment 2 Christopher Yeleighton 2011-12-13 23:30:49 UTC
(In reply to comment #1)
> It returns x*y, which may or may not be the product, the binary operator* could
> be overloaded for Tp with a completely different meaning.

The result of operator * is a product.  Of course, the kind of product depends on the operator used.

> 
> Actually I'm wondering if it's worth adding anything here.  What else is
> multiplies going to do, except multiply?  There's already a link to a page
> saying all the arithmetic operations have corresponding functors, it should be
> self-explanatory.

But then the meaning of the types defined by the class is also self-explanatory and documented elsewhere, yet they are documented.

You choose: either you add one sentence to the documentation or you use so many sentences to explain why the sentence need not be added.  As you like it.
Comment 3 Jonathan Wakely 2011-12-13 23:35:24 UTC
(In reply to comment #2)
> But then the meaning of the types defined by the class is also self-explanatory
> and documented elsewhere, yet they are documented.

They're documented in the binary_function base class and doxygen copies that to all derived classes.

> You choose: either you add one sentence to the documentation or you use so many
> sentences to explain why the sentence need not be added.  As you like it.

One sentence? Why only add it to multiplies, not the other arithmetic operations?

Actually, I choose to do nothing since I don't like being told what to do, I have more important fixes to make.