Modernes C++

This page is the starting point for my blog Modernes C++. A simple overview of my existing and upcoming posts.

This overview serves two purposes. At first, the structure gives you in one view an overview, which posts are already written and how you can find them. At second, I give you an outline of all posts, which will be written. I will successively refine the outline to make the future of this post transparent. This purpose is a more challenging task for me.


Multithreading in modern C++

C++ memory model

    1. Overview
    2. Atomic data types
      1. std::atomic_flag
      2. std::atomic
      3. std::atomic
    3. Synchronization and ordering constraints
    4. The different C++ memory models
      1. Sequential consistency
        1. Theory
        2. Practice
      2. Acquire-release semantic
        1. Synchronization and ordering constraints
        2. Transitivity
        3. The special case std::memory_order_consume
        4. The typical error
      3. Wait and Sleep
    5. Fences
      1. Memory barriers
      2. Acquire- and release memory barriers
      3. Blocking and non-blocking algorithms
      4. ABA - A is not the same as A

The threading interface

  1. Threads
    1. Creation
    2. Lifetime
    3. Arguments
    4. Sharing data
      1. Risks
      2. Locks
      3. Reader-writer locks
      4. Safe initialization
  2. Thread-local data
  3. Condition variables
  4. Tasks
    1. std::async
    2. std::packaged_task
    3. std::promise and std::future
    4. The special futures std::async
  5. Condition variables versus tasks for the synchronization of threads
  6. Challenges
    1. Data races versus race conditions
    2. Malicous data races
    3. Blocking and non-blocking algorithms

Multithreading with C++17 and C++20

  1. An overview
    1. Parallel algorithm of the Standard Template Library
    2. Atomic smart pointers
    3. std::future extensions
    4. Latches and barriers
    5. Coroutines
    6. Transactional memory
    7. Task blocks
    8. Executors
    9. Unified Futures
    10. std:::jthread

Application of multithreading

  1. The time library
    1. Overview
    2. Time point
    3. Time duration
    4. Clock
    5. Wait and Sleep
  2. Ongoing optimization with CppMem
    1. Context of ongoing optimization
    2. Introduction to CppMem
    3. Non atomic variables
    4. Locks
    5. Sequential consistency
    6. Acquire-release semantic
    7. Acquire-release semantic with a data race
    8. Relaxed semantic
    9. volatile
  3. Singleton
    1. Thread safe initialization of a singleton
  4. Calculating the sum of a std::vector
      1. Single threaded
      2. Multithreaded with shared variables
      3. Multithreaded with minimal synchronization
      4. My conclusion

Embedded programming with C++

High safety requirements

  1. C++11
    1. Automatic type deduction with auto
    2. Prevent narrowing with  {} initialization
    3. Guarantees at compile time with static_assert and the type-traits library
      1. static_assert
      2. Continuesly improvement- An introductionary example to the type-traits library
      3. Check types
      4. Compare and modfy types
    4. User-defined literals
      1. Type safe calculation with user-defined literals
      2. Raw and cooked
    5. Strong typed enumerations
    6. override and final
    7. The null poiner constant nullptr

Performance matters

  1. C++98
    1. inline
  2. C++11
    1. Constant expressions
      1. Variables and objects
      2. Functions
    2. Optimization with the type-traits library
    3. Multithreading interface
    4. C++ memory model
    5. Hashtables
      1. Overview
      2. A simple performance comparison
      3. Hash functions
      4. Buckets, capacity and, load factor
    6. Generalized PODs
    7. noexcept
  3. C++14
    1. constexpr functions

Careful handling of resources

  1. Overview
  2. Automatic memory management
    1. Smart pointers
      1. Memory and performance overhead
      2. std::unique_ptr
      3. std::shared_ptr
        1. std::shared_ptr
        2. Specialities
      4. std::weak_ptr
    2. The STL containers
      1. std::vector and std::string
      2. std::array
  3. C++ idioms
    1. Move semantic
      1. Copy versus move semantic
      2. Two nice properties
    2. Perfect forwarding
    3. RAII idiom
  4. Explicit memory managemenet
    1. Overloading operator new and delete
      1. Part 1
      2. Part 2
    2. std::allocator
    3. Strategies for the allocation of memory
    4. Pros and cons of the various memory allocation strategies
    5. Memory pool allocators from Jonathan Müller

Functional programming with C++

  1. Overview
  2. Functional Feature in C++
    1. C++98
    2. TR1 und C++11
    3. Dispatch table and generic Lambdas
    4. C++17 and C++20
  3. The definition
  4. Characteristics of functional programming
    1. First-class functions
    2. Higher-order functions
    3. Immutable data
    4. Pure functions
    5. Recursion
    6. Manipulation of lists
    7. Lazy evaluation
      1. CRTP
      2. Expression templates
  5. Functional programming with C++17 and C++20
    1. Fold expressions
    2. The new ranges library
    3. Concepts
      1. Placeholders
    4. Monads in C++


  1. Core language
    1. More details
  2. Library
    1. std::byte
    2. std::filesystem
    3. std::string_view
    4. std::any, std::optional, and std::variant
    5. The new algorithm of the STL
    6. Improved associative containers and uniform container access

What is modern C++?

  1. Two highly valuable resources
  2. Why do we need guidelines for modern C++?
  3. The C++ Core Guidelines:
    1. The Philosophy
    2. Interfaces I
    3. Interfaces II
    4. Guideline Support Library
    5. Functions
      1. Definitions
      2. Parameters: Syntax
      3. Parameters: Semantic
    6. Classes
      1. General rules
      2. The Rule of Zero, Five, or Six
      3. Destructors
      4. Constructors
      5. Copy and Move
      6. Comparison, swap and hash
      7. Functionobjects and Lambdas
      8. Hierarchies
        1. General rules
        2. Special rules I
        3. Special rules II
        4. Accessing Objects
      9. Overloading
        1. Overloading and Overload Operators I
        2. Overloading and Overload Operators II
      10. Unions
    7. Enums
    8. Resources
      1. General Rules
      2. Allocation and Deallocation of Memory
      3. Smart Pointers
      4. Passing Smart Pointers
    9. Expressions and Statements
      1. Declarations 
      2. Declarations and Initialisations
      3. More Rules for Declarations
      4. Expressions
      5. Expressions (Pointers)
      6. Conversions and Casts
      7. Rules about Don'ts (std::move and slicing)
      8. Rules for Statements
      9. To Swich or not to Switch, that is the Question
      10. More about Control Structures
      11. Arithmetic Rules
    10. Performance
      1. Rules to Performance
      2. More Rules to Performance
      3. The Remaining Rules to Performance
    11. Concurrency and Parallelism
      1. Rules to Concurrency and Parallelism
      2. More Rules to Concurrency and Parallelism
      3. Tools to Validate Concurrent-Code
      4. Sharing Data between Threads
      5. Taking Care of your Child
      6. More Traps in the Concurrency
      7. Be Aware of the Traps of Condition Variables
      8. Concurrency and lock-free Programming
      9. The Resolution of the Riddle
      10. The Remaining Rules to lock-free Programming
    12. Error Handling
      1. Rules for Error Handling
      2. A Short Detour to Contracts in C++20
      3. The noexcept Specifier and Operator
      4. Rules to Exception Handling
      5. finally in C++
      6. goto considered Evil
    13. Templates and Generic Programming
      1. Rules for Templates and Generic Programming
      2. Type Erasure
      3. Type Erasure with Templates
      4. Better Specific or Generic?
      5. Usage of Concepts
      6. Definition of Concepts
      7. Definition of Concepts 2
      8. Pass Function Objects as Operations
      9. Template Interfaces
      10. Regular and SemiRegular Typs
      11. Surprises with Argument-Dependent Lookup
      12. Template Definitions


  1. Clean C++


  1. No New New
  2. CppCon 2018
  3. Meeting Embedded and Meeting C++ 2018                                              


Thanks a lot to my Patreon Supporters: Eric Pederson, Paul Baxter,  Meeting C++, Matt Braun, Avi Lachmish, Roman Postanciuc, Venkata Ramesh Gudpati, Tobias Zindl, and Mielo.


Get your e-book at Leanpub:

The C++ Standard Library


Concurrency With Modern C++


Get Both as one Bundle

cover   ConcurrencyCoverFrame   bundle
With C++11, C++14, and C++17 we got a lot of new C++ libraries. In addition, the existing ones are greatly improved. The key idea of my book is to give you the necessary information to the current C++ libraries in about 200 pages.  

C++11 is the first C++ standard that deals with concurrency. The story goes on with C++17 and will continue with C++20.

I'll give you a detailed insight in the current and the upcoming concurrency in C++. This insight includes the theory and a lot of practice with more the 100 source files.


Get my books "The C++ Standard Library" (including C++17) and "Concurrency with Modern C++" in a bundle.

In sum, you get more than 600 pages full of modern C++ and more than 100 source files presenting concurrency in practice.


 Get your interactive course at educative

Modern C++ Concurrency in Practice: Get the most out of any machine


Based on my book "Concurrency with Modern C++" created an interactive course.

What's Inside?

  • 140 lessons
  • 110 code playgrounds => Run in browser
  • 78 code snippets
  • 55 illustrations


0 #11 Doyle 2016-12-06 03:27
I’m not that much oof a internet reader to be honest but your siites really nice, keep
it up! I'll go ahead aand boookmark your website to come back later on. Many thanks
0 #12 Elinor 2016-12-07 17:51
Hello there, I discovered your blog by means of Google whilst searching for a related matter, your website got here up, it loois good.
I have bookmarked it in my google bookmarks.
0 #13 Delphia 2017-02-02 21:00
I really like it when folks get together and share
views. Great website, keep it up!

Add comment

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code


Today 112

All 1406300

Currently are 149 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments