C++17 in details: Filesystem

Although C++ is an old programming language, its Standard Library misses a few basic things. Features that Java or .NET had for years were/are not available in STL. With C++17 there’s a nice improvement: for example, we now have the standard filesystem! Traversing a path, even recursively is so simple now!

READ MORE...

final_act - follow-up

Last time I wrote about final_act utility, and it seems I’ve stepped into a bigger area that I wasn’t aware of. Let’s continue with the topic and try to understand some of the problems that were mentioned in the comments. Intro Let’s remind what was the case last time:

READ MORE...

Beautiful code: final_act from GSL

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. Intro Follow-up post here: link.

READ MORE...

Windows File Tests

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.

READ MORE...

Google benchmark library

Some time ago I wrote about micro benchmarking libraries for C++ - here’s the link. I’ve described three libraries: Nonius, Hayai, Celero. But actually, I wanted to cover fourth one. Google Benchmark library was at that time not available for my Windows environment, so I couldn’t test it. Fortunately, under the original post I got a comment saying that the library is now ready for Visual Studio!

READ MORE...

Micro benchmarking libraries for C++

After I finished my last post about a performance timer, I got a comment suggesting other libraries - much more powerful than my simple solution. Let’s see what can be found in the area of benchmarking libraries. Intro The timer I’ve introduced recently is easy to use, but also returns just the basic information: elapsed time for an execution of some code… what if we need more advanced data and more structured approach of doing benchmarks in the system?

READ MORE...

PDB Was Not Found - Linker Warning

You’ve just recompiled a 3rd party library in Visual Studio, copied the .lib file into a proper directory, added dependencies into your final project… recompiled and it worked nicely! Good. So now you can commit the changes into the main repository. Then, unfortunately, you got a report from a build server (or from your colleague) that your recent change generated 10s of warning messages about some missing files from this new library… why is that?

READ MORE...

Automated Reports with C++

Recently, I’ve written an article about using a .NET third party library to generate reports from apps. You can find it on this in my previous post. In my opinion, the whole idea might be useful, for instance, for performance tests. I often try to make such in my blog.

READ MORE...

Digging into SOIL Library for OpenGL

When I was (re)implementing PhotoAlbum sample application I got stuck in one place. Program was about to load a list of textures (like 16 maybe) and suddenly I noticed that the whole process takes quite long time. More disappointing thing was that I got memory access errors for some images and configurations.

READ MORE...