Why (),[ ],-> operators can not overload as a friend function? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why (),[ ],-> operators can not overload as a friend function?

I have mailed this question to Mr.Strotrup and he told that It has some limitation to language design to maintain data security.

20th Jun 2017, 8:46 AM
Keval Pankhaniya
Keval Pankhaniya - avatar
1 Answer
0
ya it is also dat there is some security matter but since we use dat operators in the program in many places if we overload dat then there meaning will be changed and dat operators can't perform there work which is performed by them generally
26th Jun 2017, 5:01 AM
kshitij kumar
kshitij kumar - avatar