Lambdas

Partial Function Application

Partial Function Application is a technique in which a function binds a few of its arguments and returns a function taking fewer arguments. This technique is related to a technique used in functional languages called currying.

Read more
Tags: Lambdas
Views: 34876

More Lambda Features with C++20

Lambdas in C++20 can be default-constructed and support copy-assignment when they have no state. Lambdas can be used in unevaluated contexts. Additionally, they detect when you implicitly copy the this pointer. This means a significant cause of undefined behaviour with lambdas is gone.

Read more
Tags: Lambdas
Views: 18837

More Powerful Lambdas with C++20

Thanks to C++20, lambdas become more powerful. From the various lambda improvements, template parameters for lambdas are my favorite ones.

Read more
Tags: Lambdas
Views: 59044

C++ 20: The Core Language

My last post C++20: The Big Four started with an overview of concepts, ranges, coroutines, and modules. Of course, C++20 has more to offer. Today, let's continue my overview of the core language.

Read more
Views: 157728

C++ Insights - Lambdas

Honestly, many programmers in my classes have issues with the syntactic sugar of lambdas. Desugaring lambdas with C++ Insights helps quite often.

Read more
Tags: Lambdas
Views: 23329

C++ Core Guidelines: Pass Function Objects as Operations

An interface is a contract between a user and an implementer and should, therefore, be written with great care. This holds also true if you pass an operation as an argument.

Read more
Tags: Lambdas
Views: 25249

C++ Core Guidelines: To Switch or not to Switch, that is the Question

At first, I have to apologize. Today, I wanted to continue my journey through the C++ Core Guidelines with the arithmetic expressions. In my seminar in this week, we had a long discussion about switch statements in C/C++ and how they become totally unmaintainable. Honestly, I'm not a fan of the switch statements and I have to say: there is life after the switch statements.

Read more
Views: 53682

C++ Core Guidelines: Function Objects and Lambdas

I can not think about modern C++ without lambda expressions. So my wrong assumption was that they are a lot of rules for lambda expressions. Wrong! There are less than ten rules. But as ever I learned something new.

Read more
Views: 95179

Functional in C++11 and C++14: Dispatch Table and Generic Lambdas

My favorite example the dispatch table shows how nice the features in modern C++ work together. A dispatch table is a table of pointers to functions. In my case, it is a table of handles to polymorphic function wrappers.

Read more
Views: 76875

Mentoring

Stay Informed about my Mentoring

 

English Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Interactive Course: The All-in-One Guide to C++20

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 440

Yesterday 7888

Week 8328

Month 152499

All 11633653

Currently are 146 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments