Chapter Overview
Get an idea of what we'll cover in this chapter.
We'll cover the following...
We'll cover the following...
This chapter is a general potpourri of STL features and techniques. These are mostly new features introduced over the past few years, which may not yet be widely used. These are useful techniques that will improve the simplicity and readability of your code.
In this chapter we will cover the following recipes:
- Use the new
spanclass to make our C-arrays safer - Use structured binding to return multiple values
- Initialize variables within
ifandswitchstatements - Use template argument deduction for simplicity and clarity
- Use
if constexprto simplify compile-time decisions