what's the difference between

template<typename T>
auto add1(const T& a, const T& b)
{ return a + b; }

and

template<typename T>
auto add2(T a, const T& b)
{ return a += b; }

?

@namark Lately I've been programming a front end in React and I have been converted to the glory of Javascript

Javascript is much better than C++....

@mew27 understandable, after all javascript is C for pussies...

1 + {} = "1[Object object]"

Follow

@mew27 only if you are a true javascript fanboi

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.