Click here to Skip to main content
11,479,412 members (49,516 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ overloading
Is this correct?
Unary operator overloaded by means of a friend function takes one reference argument.

Thanks!
Posted 4-Oct-12 4:06am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
Stefan_Lang at 4-Oct-12 11:01am
   
Well he did specifically ask about friend function overloading, and in that case he would be correct. Your first link does it exactly that way, the other two links use member functions instead.
eugene.shikhov at 5-Oct-12 6:47am
   
NexusNemesis asked about definition of the term "unary operator overload" and cited wrong one.
Stefan_Lang at 5-Oct-12 10:47am
   
Don't omit "by means of a friend function". He is correct in that case.
eugene.shikhov at 10-Oct-12 4:30am
   
Well, "by means of a friend function" is in the definition part of the sentence, not in the term one. And, generally, that definition is wrong, because it describes only one particular case.
Stefan_Lang at 10-Oct-12 4:59am
   
That is not my understanding, but since the question is sufficiently answered, there is no point in arguing about grammar ;-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 240
1 Sergey Alexandrovich Kryukov 215
2 F-ES Sitecore 185
3 Richard MacCutchan 130
4 Frankie-C 104
0 Sergey Alexandrovich Kryukov 7,890
1 OriginalGriff 7,441
2 Sascha Lefèvre 3,064
3 Maciej Los 2,491
4 Richard Deeming 2,335


Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 4 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100