Random Chitchat 2018
#31
I'm getting married in the morning!
Ding dong the bells are gonna chime. Smile
[Image: my_fair_lady.jpg]

For those uncultured individuals who haven't recognized the reference: https://youtu.be/MZip6SkMZsc?t=25
Reply
Thanks given by: bearbin
#32
Congratulations!!! Smile
Reply
Thanks given by:
#33
Wohoo! Congraz to you and your wife!
Reply
Thanks given by:
#34
Last i read he was dancing and what not, now he's getting married.
I guess he be dancing a lot more from now on.

Congrats Smile.

<- Will say its past 2am, tired. not sure if the above text sounds normal. uhmz..
MCServer: infinity.thugie.nl:25566 - Online when possible, not when crashed or updating lol.
Reply
Thanks given by:
#35
It was perfect.
[Image: _20180831_122957.jpg]
Reply
Thanks given by:
#36
Congratulations and best of luck! Wink
Combustible lemons and potato batteries, that's the future.Big Grin
Reply
Thanks given by:
#37
Dear diary,
today exceptions bit me unusually hard. I am seriously considering filing a compiler bug report...

When thinking about exceptions, one would argue that any code that is after a "throw" statement will never get executed, right? Try the following code in MSVC2017 debug build:
#include <iostream>
using namespace std;

int main()
{
	cout << "Start" << endl;
	class TestException:
		std::runtime_error
	{
	public:
		TestException():
			std::runtime_error("TestException")
		{
		}
	};

	try
	{
		throw TestException();
		cout << "After throw" << endl;
	}
	catch (const std::runtime_error & exc)
	{
		cout << "Caught a runtime_error" << endl;
	}
	cout << "Done" << endl;
	return 0;
}

So, what does it do in reality? It prints "Start", "After throw", and "Done", and exits with code 0. WTF?!? How can the "After throw" line be printed??

Let's try release build, then. That one depends whether you run it in the MSVC debugger, or standalone. In the debugger, it prints "Start", "After throw" and jumps into nonexistent memory. WTF again? Standalone, it finally behaves as one would expect: prints "Start" and crashes.

I've spent a good hour hunting this bug. Turns out, the only thing I forgot in the code above is the "public" inheritance keyword in TestException's declaration. But still, without it the code behaves just weird.
Reply
Thanks given by:
#38
I guess it kind of makes sense that it didn't catch the error, but I wouldn't expect it to continue to 'after throw'.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)