Posts
![constexpr](https://www.modernescpp.com/wp-content/uploads/2022/02/constexpr.png)
constexpr and consteval Functions in C++20
/
0 Comments
With C++20, constexpr became way more powerful. Additionally, we have consteval functions in C++20…
![constexpr](https://www.modernescpp.com/wp-content/uploads/2022/01/constexpr.png)
constexpr Functions
Today, I continue my story about programming at compile time. After template metaprogramming, the type-traits…
![TimelineCpp20CoreLanguage](https://www.modernescpp.com/wp-content/uploads/2020/07/TimelineCpp20CoreLanguage.png)
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…
![TimelineCpp20CoreLanguage](https://www.modernescpp.com/wp-content/uploads/2020/07/TimelineCpp20CoreLanguage.png)
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…
![TimelineCpp20Core](https://www.modernescpp.com/wp-content/uploads/2019/10/TimelineCpp20Core.png)
C++ 20: The Core Language
My last post C++20: The Big Four started with an overview of concepts, ranges, coroutines, and modules.…
C++ Core Guidelines: Programming at Compile Time with constexpr
My mini-series about programming at compile time started with template metaprogramming, continued with…
![CharakteristikeImmutableDataEng](https://www.modernescpp.com/wp-content/uploads/2017/01/CharakteristikeImmutableDataEng.png)
Immutable Data
A key to purely functional languages is that their data are immutable. Therefore, assignments such as…
![constexpr11](https://www.modernescpp.com/wp-content/uploads/2016/11/constexpr11.png)
constexpr Functions
constexpr functions are functions that can be executed at compile time. Sounds not so thrilling. But…
![userdefinedTypes](https://www.modernescpp.com/wp-content/uploads/2016/11/userdefinedTypes.png)
constexpr – Variables and Objects
If you declare a variable as constexpr the compiler will evaluate them at compile time. This holds not…
![userdefinedLiteralsConstexprResult](https://www.modernescpp.com/wp-content/uploads/2016/11/userdefinedLiteralsConstexprResult.png)
Constant Expressions with constexpr
You can define with the keyword constexpr an expression that can be evaluated at compile time. constexpr…