Archiv der Kategorie: C++

functor vs. named lambda vs. anonymous lambda

A lambda expression is a mechanism for specifying a function. The primary use for a lambda is to specify a simple action. A lambda expression can be implemented directly as anonymous function, for example within an algorithm method, or it … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

std::vector vs c-style array

Within this article I want to compare the base array type and the vector offered by the std library. I want to call these two types “c-style array” and “std::vector”. The comparison will show you the pros and cons of … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

std::array vs c-style array

Within this article I want to compare the base array type and the array offered by the std library. I want to call these two types “c-style array” and “std::array”. The comparison will show you the pros and cons of … Weiterlesen

Veröffentlicht unter C++ | 1 Kommentar

STL Algorithms

The STL algorithms offer a powerful way to solve some base programming use cases. If you know and use these algorithms you can write more clean, efficient and robust code. But unfortunately, it isn’t that easy to know or find … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Create own STL algorithms wrapper

Within the previous articles about STL algorithms I introduced the main algorithms sorted by their use case. This analysis of the actual STL algorithms has shown the power of the algorithms but also their issues. The main issues are misleading … Weiterlesen

Veröffentlicht unter C++ | 1 Kommentar

Operations which can be used in STL algorithms

Within the previous articles about STL algorithms I introduced the main algorithms sorted by their use case. Within this article I want to give an overview about the STL operations. These operations can be used stand-alone and within STL algorithms. … Weiterlesen

Veröffentlicht unter C++ | 1 Kommentar

Algorithms for two containers

The STL algorithms offer a powerful way to solve some base programming use cases. If you know and use these algorithms you can write more clean, efficient and robust code. But unfortunately, it isn’t that easy to know or find … Weiterlesen

Veröffentlicht unter C++ | 1 Kommentar