A Non-Obvious Feature in the Syntax of Variable Declaration

Written by Maxim Razin

Take a look at this innocent looking piece of code in C++. There are no templates, no virtual functions or inheritance, but the creators of this beautiful language hid a gift right in front of us. struct A { A (int i) {} }; struct B { B (A a) {} }; int main () { int i = 1; B...

C++

Lock-free Stack for Windows

Written by Vengo

It is common practice not to like Windows. But, as a rule, phrase: “I haven't read the book but still condemn it” describes this situation well. Despite the tendency of not like Windows, there are still some things that are implemented well. I’d like to tell you about one of them. I’ll...

C++
  • 2
  • 12359

Ref-qualified member functions

Written by rpz

Today I’m going to tell you about a new and a little known (to my mind) C++ feature — reference-qualified member functions . I’ll tell about the rules of such functions overloading and, as an example of use, I’ll show you that with the help of ref-qualified you can try to improve the resource...