Core short C++ facts

Point of declaration

After difficult posts about the coroutines and before yet another one I decided to take a break and write about something easier instead. This time we will have a look at one of the aspects of the declarations namely – point of declaration. So what is this point of declaration? Intuitively it’s a point in …

Continue Reading
Coroutines Evolution

co_awaiting coroutines

Have you been co_awaiting the next post about the coroutines? Well after some break from writing finally it’s here. So first of all, if you are reading this post, I assume you are already familiar with the introduction to the coroutines and description of the promise types, since this is just a continuation of a …

Continue Reading
Coroutines Evolution

Your first coroutine

Once you got familiar with the introduction to the coroutines, then I think it’s high time to actually implement your first co-routine object. This whole post is all about understanding how to implement co-routines and related objects (especially promise_type). Before we start the adventure, please ensure, that your compiler does support coroutines. (as of this …

Continue Reading
Core

Qualification conversion

Let’s consider following piece of code from the C++ standard: Can you see the issue here? theoretically we are assigning the pointer to the pointer to the non const to the pointer to pointer to the const char. On first sight nothing dangerous happens here. After all we are assigning the pointer, through which we …

Continue Reading
Coroutines Evolution

Coroutines introduction

And so it’s happened. After a long time of doubts, opposition, and preparation of this feature, WG21 agreed on how the coroutines should look like and it’s very likely that coroutines will come into C++ 20. Since it’s a big feature I think it’s good to start preparing and learning this now (remember there are …

Continue Reading
Evolution

Error handling now and tomorrow

So we will be talking about the error handling. Well first, I guess I need to explain myself why I decided to talk about this topic. You all know about error handling mechanisms in the C++ language right? You know you can throw exceptions, you know you shouldn’t throw them too often, because of performance …

Continue Reading