Another way that one might create a stateful lambda in C++11 by manipulating the storage duration of the variables in the lambda.
I continue my series on embedded C++ with an example of how we can merge register accesses and save a few more bytes.
I continue my series on embedded C++ with an example of how templates and constexpr can provide flexibility while reducing the compile size and increasing performance.
In this episode we get set up with using the latest C++ features to program a chip which has only 2KiB of flash and 128Bytes of RAM available.
In this episode I break down how some C++ features are defined in terms of goto, so we are essentially using goto throughout our code.
In this episode we play with llvm-cbe, the C back-end for LLVM, which allows us to essentially compile C++ code into C code.
In this episode we try to see just how far we can take the idea of a “stateful lambda” by building one that can be manipulated and interacted with from the caller side.
Now that we know why we would inherit lambdas, and merge them into one implementation (to make a visitor, for instance), how and why does this compare to using a generic lambda? What advantage does one have over the other?
In this episode I build from episode 40’s discussion on inheriting lambdas and show how several C++17 features (including variadic
using declarations) can be combined to create a succinct merging of lambdas.
Last episode I showed you why you should be taking Visual C++ seriously. This episode I show you my personal pet peeve with Visual Studio that has caused many of my portability issues with cross platform development.
In this episode I demonstrate why you should take Visual C++ seriously and make it a part of your automated build environment.
In this episode I demonstrate how to build a random maze generator (and solver) that can be executed at compile time with
In this episode I demonstrate a constexpr enabled random number generator. I then it to generate a different random number sequence each time it is compiled.
In this episode I demonstrate how C++17’s support for lambdas in a constexpr context can clean up many constexpr use cases.
In this episode I discuss how (and why) you can inherit from a lambda function along with possible use cases.
C++17’s automatic class template deduction feature brings with it a new sub-feature called “deduction guides” which are used to help the compiler with class template type deduction. I give examples of what they are and how they are used in this episode.
Experimenting with C++17’s class template argument type deduction feature and learning what its limitations are.
Part 3 of our basic introduction to understanding the assembly output from your compiler. In this episode we do some reverse engineering of other non-Intel architectures.
Review of using Visual C++ 1.52 from 1993. This is the oldest version of Visual C++ available on MSDN.
A comment was made on my YouTube channel that destructuring in C++17 would be much more useful if it worked with standard containers. At the moment I responsed that this would be someone impossible to get right without adding too much overhead.
C++17 has not only added many new interesting things, it has removed and deprecated a few outdated features as well.
In this SE we follow up episode 18’s constexpr if with some concrete examples of where it can be used in existing code.
Last week we discussed how to use
std::bind. this week we discuss why you should never use
Many of the different ways you might implement a Fibonacci sequence in C++ plus one you’ve probably never considered.
In this episode I correct some of the details of the “std::future Quick Start” episode while expanding on the info provided.
In this episode Jason wraps up what we’ve learned so far about variadic templates and shows some additional techniques to consider.
In this episode Jason gives a very fast quick-start to what std::future is and how to use std::async to run a function in another thread.
In this episode Jason discusses some of what C++ name mangling is, and how to demangle names at runtime.
In this episode I give a brief introduction to C++ variadic templates and cover some compile time and runtime performance considerations.