You consider it reasonable, and I cannot understand what your interviewer wanted to hear from you.
But as far as I know, the ability to have consistent syntax for copy constructors and assignment operators was an important reason Stroustrup introduced links. For example, suppose we have no C ++ references, and we want to make some copy construct by passing the argument with a pointer:
class MyClass {
And this is clearly not how the built-in types work:
int a, b, c; int d = a; a = b = c = d;
Links have been introduced to resolve these heterogeneities.
UPD
For authoritative proof of this point, please refer to Β§ 3.7 "Stroustrup Design and C ++ Evolution". Unfortunately, I do not have the English text of the book, but the first sentence in this chapter (back-translated into English):
Links were introduced primarily to support operator overloading.
And in the next few pages, Stroustrup describes the topic in detail.
source share