Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

(2^19)+6th reason why C++ sucks

Name: RAGE 2012-02-05 11:18

error: overloaded 'operator=' must be a non-static member function

This bitch does not allow me to implement custom operator= for class that I can't modify(well, I can apt-get source or modify header files but it's too dirty).

I can overload += as static non-member function just fine.

So in other words, if I need to use Library1 that provides Vector3 and Library2 that provides VecXYZ and these libraries do not know about existence of each other I can write additional functions so vector3+vecXYZ,vector3+=vecXYZ will work but assignment is no-no. Thou shalt not write functions for converting one type of vectors to another.

WTF? Where is justice?

Name: Anonymous 2012-02-07 13:25

>>21
In short, C++ doesn't suck. You do.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List