Posts

Showing posts with the label Cpp

Coroutines in C++

For the last few months I've been intrigued by the coroutines in C++. This feature is something I always wanted to have in C++ since I saw it in action in Unity. I've already implemented them in my Enhanced Code Flow for Unreal Engine in order to have my desired "Delay" function in code. However, it wasn't so easy to understand how to implement them. The official cpp reference is a great source of knowledge, but it's difficult to learn the basics from it. This is why I decided to write a document which should introduce more newby-friendly approach of learning about them. I've just published the C++20 coroutine samples , which is a collaborative document that aims to help to understand what are the coroutines, how to write them in C++ and when they are useful. Because it's on GitHub you are all invited to write Issues and Pull requests with any fixes and suggestions on how to improve this document and samples. Cheers <3

Enhanced Code Flow plugin for UE4

Image
I proudly present my first, finished and well polished plugin for Unreal Engine 4! What does it do? This code plugin provides functions that can drastically improve the quality of life during the implementation of game flow in C++. Basically, if you ever wanted to have an equivalent of Delay Node in your code - you might like this plugin very much.

Variadic templates and initializer lists

Here I'd like to show you how to utilize variadic template functions' properties and initializer lists to write better and cleaner code.

C++ traits vs. if constexpr

Long time ago I wrote about C++ traits and how to use them to write functions which can have different bodies depends on the template type they use.

Quick start to CMake

CMake is a family of tools which mainly serves to build cross-platform applications and libraries written in any of C family languages (C, C++, C#, Objective-C, CUDA). It is not a compiler, or a construction tool though. Its goal is to generate a solution which will be used to build it. It’s a template consisting information about source files, dependencies and compilation settings that should be used to build a project no matter a platform it is built for or IDE it is used. The best way to use CMake is via terminal, but many IDEs like CLion or Visual Studio Code integrates CMake into their pipeline. Does it sound like magic? Only at the beginning. After setting it up for the first time everything becomes extra clear! Let’s check the basics.

Visual Studio Code C++ Quick Start

Image
I was writing about the best IDEs for C++ development lately and I mentioned a Visual Studio Code – a free, open source, powerfull editor that can be easily transformed into a slick environment for C++ coding. But how to do such a transform? This is my approach.

In search of the best C++ IDE on Linux

Image
There was a time I decided to try a Linux. One of the issues I had was that I struggled to find a good C++ IDE.

C++11 rvalue references usage

Rvalue references are one of the biggest feature introduced to the c++11, but I found it rather difficult to understand and to find a usage for them. It was the issue which was very similar to the understanding c++ traits I had. Now, I’d like to write down all what I’ve learned, in order to remember it better and to share the way I understand it the best. This article is a very quick introduce to why we need rvalue references and why they are awesome!

C++ Traits explained

Traits in C++ is a concept of using templates in order to implement different behaviour for the same class/function depending on the types that are used inside of them. Ok, so why am I writing about this again? There are many readings about traits, but for some reason I had trouble with understanding them, probably because of lack of life examples. I finaly got it when I had to use them on my own. So I decided to tell about my work, so maybe it will help someone to understand what it is and what cool stuff can be done with it.