24 April 2017

Packing Bools, Performance tests

Packing booleans, bits

Imagine you have an array of booleans (or an array of ‘conditions’), and you want to pack it - so you use only one bit per boolean. How to do it? Let’s do some experiments!

18 April 2017

final_act - follow-up

final_act follow-up

Last time I wrote about final_act utility, and it seems I’ve opened a bit bigger box that I’ve previously assumed. Let’s continue with the topic and try to understand some of the problems that were mentioned in the comments.

10 April 2017

Beautiful code: final_act from GSL

Code function

Sometimes there’s a need to invoke a special action at the end of the scope: it could be a resource releasing code, flag set, code guard, begin/end function calls, etc. Recently, I’ve found a beautiful utility that helps in that cases.
Let’s meet gsl::final_act/finally.

03 April 2017

C++18, Why not?

C++18 experiments

As you’ve might already notice I’ve made a little joke on Saturday, which was the April Fools’ Day. I got the courage to announce C++18 next year! :)
While it was a bit funny, I didn’t expect much traffic (as it was Saturday). Still, my stats shows that a lot of people clicked and viewed the post. Thanks!

Today I’d like to continue the topic: why not and have C++18?

01 April 2017

C++18 Next Year!

C++18 Next Year

I have a great news! During the last meeting in Kona, the committee not only made final notes on the C++17 standard! There’s also a groundbreaking news that behind the curtains they planned C++18!

27 March 2017

Windows File Tests

Transform a file on Windows

You want to transform one file into another, input into output. What API will you choose on Windows? WinApi? C++ Streams or good old stdio?

Last year in September I looked at four ways of processing a file on Windows. Also, I did some performance tests.
The whole project description was recently published in Visual Studio Magazine.

20 March 2017

C++ Jobs and Predictions

C++ jobs and predictions

There are probably billions of lines of code written in C++ already. New code is being written every day. But will this trend continue? Will you be able to find a C++ job in five years?
Let's have a quick view.

06 March 2017

On Toggle Parameters

On Toggle parameters

I got very interested in one topic that recently appeared on on Andrzej’s Blog: Toggles in functions. I though that maybe is worth to express my opinion as a separate blog post.
Please take a look.

20 February 2017

Modernize: Sink Functions

Passing Ownership of a resource to functions

One of the guidelines from Modern C++ is to avoid using raw new and delete. Instead, you should use a smart pointer, a container or other RAII object. Today I’d like to focus on so-called ‘sink functions’ that takes ownership of input parameters. How can we modernize code around such calls?

06 February 2017

How To Stay Sane with Modern C++

Complex C++

Have you seen my recent blog post with the list of C++17 features? Probably this is not the best measurement, but it got only ~30% of the average read (while other articles might get like 70, or even 90%). I am not complaining, the list is crazy and contains probably too many details of the new standard.

Another stat: C++ standard page count: from 879 pages for C++98/03 to 1586 for C++17 (draft)!

Do you need to learn all of that stuff to write good code?
How to stay sane in the C++ world today?

23 January 2017

Const, Move and RVO

Const Move and RVO

C++ is a surprising language. Sometimes simple things are not that simple in practice. Last time I argued that in function bodies const should be used most of the time. But two cases were missed: when moving and when returning a value.

Does const influence move and RVO?

09 January 2017

C++ 17 Features

C++17 features

In my last C++ summary (for 2016) I wrote that the draft for C++17 is the most important thing that happened. I’ve put a list of features of the new standard, and today I’d like to expand the topic so we can learn some more details.

31 December 2016

C++ Status at the end of 2016

C++ Status at the end of 2016

Another year and another C++ Status! It’s hard to believe, but it’s my fifth time I am writing this summary. And, as usually, C++ language is very alive. The biggest news for the year?

Of course, it must be: the final draft for C++17!.

What else have happened? See my full report below.

27 December 2016

2016 Blog Summary

Blog Summary for 2016

Another year of blogging! Was it good or bad? What’s the plan now? What were the most popular posts?

© 2017, Bartlomiej Filipek, Blogger platform
Any opinions expressed herein are in no way representative of those of my employers.
This site contains ads or referral links, which provide me with a commission. Thank you for your understanding.