unrelenting.technology

Hi! You are viewing the archive of unrelenting.technology. This website is no longer updated, my current one is val.packett.cool. Check it out instead :)

True story:

A friend is writing some C++ in Visual Studio. There’s a template class with a copy constructor like this one:

    SomeThingClass(const SomeThignClass& other) { …

She asks me about the weird error on this line – something about the β€œreturn type is int by default” behavior from old C not being allowed anymore. What the hell, this is a constructor. We spend, like, ten minutes in a WTF state.

Then we decide to copy the code to my laptop and compile with clang.

 error: no template named 'SomeThignClass'; did you mean 'SomeThingClass'?

Moral of the story: even two people can just not notice a little typo where the oredr of lettres is swapepd. Computers are better at this. UNLESS THE COMPUTER IS RUNNING MSVC

Published

Categories and tags

Notes #c++

Posted using

micropublish.herokuapp.com