Talk:cpp/language/member functions

no ref-qualifiers
The page says: "During overload resolution, non-static cv-qualified member function of class X is treated as a function that takes an implicit parameter of type lvalue reference to cv-qualified X if it has no ref-qualifiers or if it has the lvalue ref-qualifier". So it seems from this text that "no ref-qualifiers" and "lvalue ref-qualifier" should work exactly same. But for g++ 20161124 this is not true. Look at this code:

g++ doesn't compile this code. But if I change "operator &" to "operator ", the code compiles. So (as it seems from g++ 20161124 behavior) there is difference between "no ref-qualifiers" and "lvalue ref-qualifier". So, please, change the page. I used g++ from Debian package gcc-snapshot 20161124-2. Safinaskar (talk) 10:47, 5 December 2016 (PST)
 * The sentence you're referring to is correct (it's 13.3.1[over.match.funcs]p4), but indeed incomplete, it's missing 13.3.1[over.match.funcs]p5.1 which imposes an additional rule allowing rvalues to bind to non-const lvalue reference implicit object parameters, but only when it belongs to a function with no ref qualifier. This appears here on cpp/language/overload_resolution, but it's worth adding it to this page as well, thanks. --Cubbi (talk) 11:36, 5 December 2016 (PST)
 * Thanks. Safinaskar (talk) 05:47, 6 December 2016 (PST)

Purpose of & and && qualifier
It would be nice if it is explained what these qualifier are good for, either in text or as a better example code. --Roker (talk) 02:45, 20 November 2018 (PST)

Redirection of "member function" to "non-static member function"
Static member functions exist as well. While cpp/language/classes mentions them explicitly and link to appropriate pages of the wiki, other pages like cpp/language/functions and cpp/language/function just have links for "member function" that redirect here. I think this redirection is a mistake.

Here are my proposed solutions (in order of preference):
 * Add a small paragraph on top of the page about the existence of a section on static member functions on the wiki and link to it. (though that might involve repeating text from that article)
 * Add a subheading in cpp/language/classes before "A class can have the following kinds of members", redirect member_function to that subheading. Move this page from member_functions to non_static_member_functions.
 * Rewrite the entire page.

Chandradeep Dey (talk) 01:21, 9 June 2020 (PDT)
 * good point, added a link to static m.f. from the top of this page, and others made edits elsewhere. --Cubbi (talk) 11:21, 9 June 2020 (PDT)
 * Thanks Chandradeep Dey (talk) 13:00, 10 June 2020 (PDT)

Top of page example:
What does do in the class declaration? The comment doesn't help much 217.45.105.153 15:39, 8 October 2020 (PDT)
 * This is equivalent to two separate member-function declarations with the same return value :


 * --Space Mission (talk) 17:47, 8 October 2020 (PDT)
 * I don't know why that didn't occur to me, thanks! I sometimes forget about things like  working and such. I feel silly now! Thanks for the speedy reply too 217.45.105.153 19:18, 8 October 2020 (PDT)
 * Well, this case with functions is not that obvious anyway. :-)