constexpr std::vector and std::string in C++20

Probably the most viral keyword in modern C++ is constexpr. With C++20, we have a constexpr std::vector and a constexpr std::string. Additionally, both containers can be manipulated with the constexpr algorithms of the Standard Template Library. 

Read more
Views: 77156

std::span in C++20: Bounds-Safe Views for Sequences of Objects

In my seminar, I often hear the question: How can I safely pass a plain array to a function? With C++20, the answer is quite easy: Use a std::span.

Read more
Tags: span
Views: 78879

And the Winners are:

Last week,  I launched a quiz. The price was it to win one of the five vouchers for the book "Modern C++ for Absolute Beginners" from Slobodan Dmitrović.

Read more
Views: 6559

Five Vouchers to win for the book "Modern C++ for Absolute Beginners"

Is it possible to introduce C++ in 300 pages? Yes, it is. The book "Modern C++ for Absolute Beginners" from Slobodan Dmitrović proves it.

Read more
Views: 9073

volatile and Other Small Improvements in C++20

Today, I complete my tour through the C++20 core language features with a few small improvements. One interesting of these minor improvements is that most of volatile has been deprecated.

Read more
Views: 22455

New Attributes with C++20

With C++20, we got new and improved attributes such as [[nodiscard("reason")]], [[likely]], [[unlikely]], and [[no_unique_address]]. In particular, [[nodiscard("reason")]] allows it to express the intention of your interface way clearer.

Read more
Views: 21655

Compiler Explorer, PVS-Studio, and Terrible Simple Bugs

Do you know that PVS-Studio is integrated into the Compiler Explorer? If not, you should definitely read this guest post from Andrey Karpov including a promo code. 

Read more
Views: 11976

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 behavior with lambdas is gone.

Read more
Tags: Lambdas
Views: 19781

The C++ Standard Library: The Third Edition includes C++20

Just updated: The C++ Standard Library: What every professional C++ programmer should know about the C++ standard library.

Read more
Views: 28476

More Powerful Lambdas with C++20

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

Read more
Tags: Lambdas
Views: 63332

Stay Informed about my Mentoring

 

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

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

Course: Master Software Design Patterns and Architecture in C++

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 4514

Yesterday 6193

Week 10707

Month 32381

All 12110590

Currently are 173 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments