Concepts

Sentinels and Concepts with Ranges Algorithms

The ranges library in C++20 supports sentinels. Sentinels stand for the end of a range and can be regarded as generalized end iterators.

Read more
Views: 9204

Check Types with Concepts

Concepts are a powerful and elegant tool to check at compile time if a type fulfills. Thanks to static_assert, you can use concepts as a standalone feature: static_assert(Concept<T>).

Read more
Views: 6550

Check Types with Concepts - The Motivation

static_assert allows you to check at compile time if a type T fulfills the Concept: static_assert(Concept<T>).

Read more
Views: 7000

Using Requires Expression in C++20 as a Standalone Feature

In my last post "Defining Concepts with Requires Expressions", I exemplified how you can use requires expressions to define concepts. Requires expressions can also be used as a standalone feature when a compile-time predicate is required.

Read more
Views: 8444

Defining Concepts with Requires Expressions

In my last post, "Define Concepts", I defined the concepts Integral, SignedIntegral, and UnsigendIntegral using logical combinations of existing concepts and compile-time predicates. Today, I use Requires Expressions to define concepts.

Read more
Views: 9610

Define Concepts

There are two ways to define a concept: You can combine existing concepts and compile-time predicates, or you can apply a requires expression in four different ways.

Read more
Tags: Concepts
Views: 9472

A std::advance Implementation with C++98, C++17, and C++20

In my last post, I presented a possible std::advance implementation based on tag dispatching. One of my readers mentioned that I could also implement std::advance based on constexpr if, or concepts. His right. So let's do it.

Read more
Views: 12930

Automatic Return Type (C++11/14/20)

I started my discussion about the  "Automatic Return Type (C++98)" in my last post. Today, I'm faced with the same challenge but solve it with C++11, C++14, and C++20.

Read more
Views: 36125

Function Templates - More Details about Explicit Template Arguments and Concepts

In the last post, "Function Templates", I wrote about the overloading of function templates and automatically deducing the return type of a function template. Today, I dive deeper and explicitly specify a function template's arguments and bring concepts into the play.

Read more
Tags: Concepts
Views: 14534

Concepts in C++20: An Evolution or a Revolution?

Let me conclude my series to concepts with this meta-post. Are concepts an evolution or a revolution in C++? The answer to this question bothered me quite a time.

Read more
Tags: Concepts
Views: 28466

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 3870

Yesterday 4344

Week 40748

Month 20994

All 12099203

Currently are 155 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments