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-05 16:05

i'm not a c++ guy but i'm not seeing what is wrong with overloading operators for vector types

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