A Little E-Book: Learn from Real Examples How to Avoid Bugs

Written by Andrey Karpov

Here is a small e-Book for your attention: The Ultimate Question of Programming, Refactoring, and Everything . This book is intended for C/C++ programmers, but it could be of interest for developers using other languages as well. What makes the book peculiar is the descriptions of real, not...

C++
  •  
  • 3950

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++

Undefined Behavior and Fermat’s Last Theorem

Written by Tyomitch

In accordance with the C and C++ standards, if the program leads to an integer overflow or any other “undefined behavior” (UB), the result of the program performance can be anything: it can post obscenities to Twitter or format your disk… Unfortunately, “Easter eggs” that would make the program...

C++

Masking a Class in Boost Graph. Part 3: Finding the Path

Written by Vadim Androsov

In the previous articles of the series we’ve reviewed the adaptive process of the square game field for concepts of boost graphs. Now we’ll consider the process of finding the path in the square field. Implementation of boost search allows adapting the algorithm quite accurately. In this article...

C++

Boost Concepts

Written by Vadim Androsov

I was always scared to use C++ templates due to the absence of standard mechanisms for setting parameter limits. In other words, when a developer writes the following function: template bool someFunc(T t) { if (t.someCheck()) { t.someAction(0); }...

C++
  • 1
  • 7019

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
  • 13757

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...

C++
  • 2
  • 7177

Lock-free Data Structures. Memory Model. Part 3.

Written by khizmax

In the previous article we looked inside the processor, even if it’s hypothetic. We have clarified that for the proper parallel code execution we should prompt the processor to what limits he is allowed to execute its internal read/write optimizations. These prompts are memory barriers....

C++

Building a website with C++ (CppCMS). Part 1.

Written by Drus_K

Dear %username% , I would like to share with you my first-hand experience in creating a Website on CppCMS (library-template engine on C++). It can also be named as “help for beginners on CppCMS”. Why Would You Write a Website with C++ There are different pros and cons...

Lock-free Data Structures. 1 — Introduction

Written by khizmax

I hope that this article will give a good start for a series of notes about lock-free data structures. I would like to share my experience with community, monitoring and thoughts about what lock-free structures are, how to implement them and whether the concepts of Standard Template Library...