Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specify copy assignment operator for vec swizzles
Even though we specify an assignment operator for `__writeable_swizzle__` like this: ``` template</*unspecified*/> const __writeable_swizzle__& operator=(const __writeable_swizzle__</*unspecified*/>& rhs) const ``` The compiler will not select this operator when the left-hand-side has the same type as the right-hand-side. (Even though the template constraints would allow such a selection.) Instead, the compiler will generate the default copy assignment operator and call that. Since the default copy assignment operator would not be correct (performing a shallow copy), the `__writeable_swizzle__` class must provide a user defined copy assignment operator. The copy assignment operator for `__const_swizzle__` was already deleted in the "constructors" section. It seemed better to move this to the "member functions" part of the specification, next to the specification for the copy assignment operator for `__writeable_swizzle__`.
- Loading branch information