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; }
?
@mew27 understandable, after all javascript is C for pussies...
1 + {} = "1[Object object]"
@iron_bug to you any quirk of C is the word of god, so not sure what to argue here... just look up "quirks of C language"? Plenty of results.
Since we're doing arithmetic here suffice it to say:
unsigned short * unsigned short = insta-undefined-behavior-trollface
Also 2[a] is definitely syntax sugar for puppies only, I agree.