unrelenting.technology

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

Posts Notes #c++

Using

micropublish.herokuapp.com

Post your response

If you write a response on your website, mark it up with h-entry and let me know the URL: