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
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.