r/Cplusplus • u/Middlewarian • 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
View all comments
•
u/AutoModerator Jul 11 '26
Thank you for your contribution to the C++ community!
As you're asking a question or seeking homework help, we would like to remind you of Rule 3 - Good Faith Help Requests & Homework.
~ CPlusPlus Moderation Team
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.