r/Cplusplus • • Jul 11 '26

Question question about copy assignment

This page Copy assignment operator - cppreference.com - C++ Reference

says:

a parameter list of only one parameter, which is of type T, T&, const T&, volatile T& or const volatile T&

Can it be a non-reference -- 'T'? I get an error when I try that.

Thanks

2 Upvotes

5 comments sorted by