I have some compilation problems pushing back elements of type T to a vector when compiling with g++ -std=c++0x.
This is a minimal example:
#include <
The standard's definition of copy-assignment operator is (section [class.copy]):
A user-declared copy assignment operator
X::operator=is a non-static non-template member function of classXwith exactly one parameter of typeX,X&,const X&,volatile X&orconst volatile X&.
But the X& and volatile X& variants may not be compatible with containers assuming an assignment can be made from an r-value RHS.
NOTE: Passing by value, e.g. X::operator=(X) is a fundamental part of the copy-and-swap idiom.