C++ Standard Library including C++ 14 & C++ 17 (Rainer Grimm)

Application of Libraries - Including Header Files The first step in using libraries is to include the header files. Let’s find out how. Modifying Algorithms - Copy Elements and Ranges Learn how to perform various copy operations on a given range. Input and Output Streams - Introduction This chapter will cover all the input and output features in C++17. Regular Expressions - The Search Result Whenever we verify whether a piece of text satisfies our regular expression, we have to store the results somewhere. std::match_results allows us to do just that. Unordered Associative Containers - Keys and Values This lesson is about the different properties of keys and values in this type of associative containers. Adaptors for Containers - Queue A queue follows the opposite principle of stack. It is a very powerful data structure in its own right. Sequential Containers - Introduction The first category of containers we’ll study are the sequential containers. Listed below are the major features for various types of sequential containers. Callable Units - Functions and Function Objects Let’s take a look at the first two types of callables in C++. Interface of All Containers - Assign and Swap This lesson deals with ways to update and swap values in containers. Useful Functions - Move vs. Copy In this lesson we’ll see how the std::move utility proves more efficient that copying. Reference Wrappers - std::ref and std::cref In the last lesson, we were introduced to reference wrappers. Now, we will learn how to create them. Utilities - Utilities in C++ Standard Library In this part of the course, we will delve into some of the features that further enhance the the usability of C++. Useful Functions - Swap Swapping is made simple in C++ using std::swap. Adaptors for Functions - Behavior of std::bind and std::function Let’s take a step deeper into the workings of std::bind and std::function. std::any, std::optional, and std::variant - std::variant The last part of this section deals with std::variant which allows us to create a variable from any of the types specified in the std::variant container. std::any, std::optional, and std::variant - std::optional std::optional is very convenient when the value of our object can be null or empty. Time Library - Time Duration The time duration is a measure of how many ticks have passed since a certain time point. The implementation is presented in this lesson. Useful Functions - Forward Now, we’ll learn about the way std::forward helps us create generic function templates. Overview - Multithreading Now, we will talk about how C++11 supports and implements multithreaded programming. Application of Libraries - Introduction In this lesson, we’ll define the three steps needed to use libraries in C++. Smart Pointers - Unique Pointers The first type of smart pointer in this section is the unique pointer. It limits the access to its resource, thereby, maintaining its privacy. Type Traits - Check Type Information Type traits allow us access and verify the type categories for all our variables. We’ll write some code to do that. Overview - Input, Output and Filesystems C++17 builds upon the prominent I/O stream library but adding the new filesystem library. Time Library - Time Point Now, we will study the first component of the chrono library. Smart Pointers - Introduction This section will deal which a very powerful new category called smart pointers. Let’s begin. Pairs and Tuples - Tuples Tuples extend the principles of a pair to a broader perspective. Find out more in this lesson. Interface of All Containers - Introduction This chapter deals with the different features that are present in all types of containers in C++. Application of Libraries - Building an Executable In this lesson, we’ll briefly examine the final step of library usage: linking our executable with libraries. Pairs and Tuples - Pairs The idea of a pair of values often comes handy in programming. C++ allows us to make these pairs. Type Traits - Introduction The type traits library helps us optimize our code. This section will cover the library in depth. Smart Pointers - Cyclic References In this lesson, we’ll see how the use of shared pointers can create a reference cycle and why this could be harmful. Time Library - Clock Here, we briefly discuss the different types of clocks in C++. Smart Pointers - Weak Pointers This is the last component of the smart pointer family. Its purpose is much more limited compared to the others. Application of Libraries - Using Namespaces Namespaces have to be written exactly as they are, however, the ‘using’ method allows us to make namespaces simpler. Type Traits - Type Comparisons and Modifications Sometimes we need to manipulate or compare different types. We can use the type traits library for that! Time Library - Introduction This library gives us the power to run multithreads based on our time requirements. Useful Functions - The min, max and minmax functions This family of functions allows us to find the minimum and maximum in a set of data. Let’s find out how. Reference Wrappers - Introduction C++ takes reference functionality one step higher by introducing reference wrappers! Smart Pointers - Shared Pointers Next, we have the shared pointer. It follows the principle of keeping a reference count to maintain the count of its copies. The lesson below elaborates further. Adaptors for Functions - std::bind and std::function Programmers can use this pair of utilities to create and bind functions to variables. The Standard Library - History Let’s dive into some of the milestones in C++'s long history. Overview - Text Processing C++ handles text by using std::string and std::string_view utilities. The Standard Library - Utilities To use C++ to its full potential, we must use the multitude of utilities it provides. Introduction - C++ versus C++11 This lesson talks about how C++11 was a big step in the evolution of C++. Overview - Numeric Functions Numerical computations are very powerful in programming, and C++ provides a diverse range of mathematical functions. The Standard Library - Components In this lesson, we’ll examine the three basic elements which make C++ functional. Introduction - Further Information Throughout the course, there will be links to help you understand the concept further. Introduction - Conventions Here, I’m just listing down a few points about how the course content is structured. Introduction - About this course Have questions about About this course? Go for it! Introduction - Source Examples There are a few things to remember while reading the coding sections. Have a look. More Algorithms - Permutations We can see the different permutations in a range using C++. Sequential Containers - Lists C++ supports the linked list data structure and provides additional methods to improve the list’s functionality. Strings - Conversion Between C++ and C Strings There are several ways to convert C++ strings to C strings. Let’s go through them now. Sequential Containers - Forward Lists A forward list is the primitive form of the list structure we studied in the previous lesson. Nevertheless, forward lists are still useful. More Algorithms - Merge Operations In this lesson, we’ll learn different ways of combining ranges. Strings - Modifying Operations C++ gives us a variety of tools to modify and manipulate strings. More Algorithms - Numeric The numeric library is host to several numeric functions. We’ll look at a few of them in this lesson. Adaptors for Containers - Priority Queue By combining a queue and order, we get priority queues! Interface of All Containers - Create and Delete Below, we examine the different methods available for constructing/destroying containers with particular parameters. Strings - Introduction In this chapter, we’ll explore one of the most prominent classes in C++: Strings.<br> Let’s begin! Sequential Containers - Vectors A more refined version of arrays, vectors simplify insertion and deletion of values. Strings - Input and Output Strings are well-known for their use in input and output of data. Let’s look at how this is done. Strings - Size versus Capacity We’ll test and alter the capacity of a string. More Algorithms - Min and Max Let’s take a look at the functions C++ provides to check the minimum and maximum in a range. Numeric - Random Numbers There’s a whole library dedicated to the generation and usage of random numbers. Ordered Associative Containers - Keys and Values The properties of keys and values are listed below. Ordered Associative Containers - Overview Let’s start our discussion on ordered associative containers by defining some simple characteristics. Ordered Associative Containers - The Comparison Criterion This lesson talks about the rules followed by ordered associative containers when comparing the values inside them. Interface of All Containers - Size Let’s find out how we can check the size and capacity of our container. Associative Containers - Introduction After sequential containers, let’s enter the world of associative containers and learn about the principle of key/value pairs. Associative Containers - Insertion and Deletion In associative containers, values are inserted and deleted based on the keys they have. Adaptors for Containers - Stack It’s time to study the behavior of this popular data structure. Unordered Associative Containers - The Hash Function Here, we will understand why hash functions are essential in unordered associative pairs. Unordered Associative Containers - The Details We’ll finish this section by learning some terminologies present in unordered associative containers. Unordered Associative Containers - Performance The unordered associative container type is more optimized compared to its ordered sibling. Ordered Associative Containers - Special Search Functions The functions listed in this lesson make searching more efficient. Sequential Containers - Deques Let’s take a look at deques and their similarity to vectors. Sequential Containers - Arrays The array type is perhaps the most popular sequential container. This lesson will cover its properties in detail. Ordered Associative Containers - Maps Now, we shall look at the features of std::map which make it such a popular container. Interface of All Containers - Access Have questions about Access? Go for it! Interface of All Containers - Compare All the general comparison operators work on containers. Adaptors for Containers - Introduction In this section, we will tackle three advanced types of sequential containers which are built on std::deque. Callable Units - Introduction Functions, function objects and lamda functions are all part of the callable units class. They are ‘called’ to retrieve data or perform an action. Non-Modifying Algorithms - Check Conditions on Ranges C++17 contains several algorithms to check whether a value or values in a range fulfill our given condition. Let’s look at these algorithms now. Iterators - Introduction In this part of the course, we will learn to implement iterators and use them to traverse our data. Algorithms - Introduction This chapter brings us to the various computing algorithms supported by C++17. Algorithms - Iterators are the glue Without iterators, there would be no way for us to move through the container and alter it according the algorithm. Hence, the iterator forms the backbone of this is process. Iterators - Iterator Creation In this lesson, we’ll observe how a map creates and handles its iterator. Non-Modifying Algorithms - Introduction Have questions about Introduction? Go for it! Iterators - Categories Iterators can be categorized into three primary types, each with its own advantages. Iterators - Adaptors Iterators can do more than just search through data, they can now insert values! Algorithms - Algorithms with Parallelized Versions A list of all the algorithms which can be parallelized. Callable Units - Lambda Functions Lambda functions provide us all the functionality we need, on the go. They are faster than usual functions. Algorithms - for_each As the name suggests, this method picks up each value in our container and performs the desired action. Algorithms - Conventions What are the rules and terminologies needed to run algorithms? Let’s find out. Iterators - Useful Functions C++ offers several tools to make the iteration process simpler yet safer. Algorithms - Sequential, parallel, or parallel execution with vectorisation We will now learn how to execute our algorithm according to a certain execution policy. Non-Modifying Algorithms - Search Elements This lesson will cover the different ways of searching for values using ‘find’. More Algorithms - Heaps This is another popular data structure implemented in C++ using an range. More Algorithms - Binary Search The fast search which has a search time of O(log n) has been predefined in C++. Strings - Element Access Accessing a character in a string is very easy and similar to element access in arrays. Strings - Comparison and Concatenation Can we merge and compare strings like we did with ranges? This lesson shows us how. Strings - Search In this lesson, we’ll examine the different search features available in the string class. Modifying Algorithms - Reverse Ranges There were always roundabout ways of reversing a range. Now we have a predefined function to do that. Strings - Create and Delete Let’s start things off by learning how to create and destroy strings. Numeric - Functions Inherited from C As C++ evolved from C, many of the functions have been passed down to the new language. We’ll discuss them in this lesson. Modifying Algorithms - Randomly Shuffle Ranges Rearrange the values in your range randomly, using std::random_shuffle and std::shuffle. Modifying Algorithms - Swap Ranges Along with moving data between ranges, we can also swap their values with one another. Non-Modifying Algorithms - Compare Ranges The functions describe below allow us to check the degree of equality between ranges. String View - Create and initialise As always, let’s start by creating a string view. String View - Non-modifying operations In this lesson, we’ve listed down the non-modifying operations that can be performed on a string view. Modifying Algorithms - Remove Duplicates Next, we’ll study ways to make sure each element in our range is unique. Modifying Algorithms - Transform Ranges Now we will study std::transform which is used to perform transformations on a range. More Algorithms - Sort Sorting and verifying the sortedness of your data has been made very easy in C++. Let’s find out how. Modifying Algorithms - Replace Elements and Ranges Let’s look at the functions we can use to update and replace values in ranges. Modifying Algorithms - Move Ranges In C++, we can move data from one range to another. Read the lesson for more details. New Algorithms with C++17 - Scan Scan operations are useful when working with prefix sums. String View - Modifying operations There are a few modifying operations that a string view can perform. Some of these are unique to string views only. Let’s check them out. String View - Introduction The string view class builds itself on the string class. It restricts the operations that can be performed on a string. Strings - Numeric Conversions Apart from conversion to C string, a string can also be converted to a float. Regular Expressions - Introduction Now we move on to regular expressions in C++. Our first step will be to understand the purpose of this library. More Algorithms - Partition This algorithm allows us to divide or split ranges into separate sets. Modifying Algorithms - Rotate Ranges We can rotate our data such that every element now lies at a different index, which is decided by the rotation offset. New Algorithms with C++17 - Reduce We often need to reduce a numeric range. That is where std::reduce comes in handy. Modifying Algorithms - Fill and Create Ranges Next in the line of modifying algorithms, we have the ‘fill’ and ‘generate’ functions. Modifying Algorithms - Remove Elements and Ranges Apart from insertion, copying and replacement, we can also delete elements completely. File Systems - File types There is a wide variety of checks which we can use to get information about a file and the filesystem. They have been explained in this lesson. Input and Output Streams - Format Specifier Since we’re tackling text, it would only be appropriate to have tools which can help us format our our data. File Systems - Filesystem library This newly added feature lets us interact with the directories and files on our system. Multithreading - Atomic Data Types Now we will look at the atomic data types that C++ offers and their applications. Regular Expressions - Replace Along with searching, you can also alter the text if it matches your regex condition. Input and Output Streams - File Streams Now, we shall learn how to communicate with files using C++. Multithreading - Thread Local Data In this lesson, we will learn about data that is bound to the lifecycle of a thread. Regular Expressions - Repeated Search We will now introduce the concept of iterators in regular expressions. Regular Expressions - Character Types This lesson will explain how regex identifies the different types of text in C++. Regular Expressions - Match We learned about std::match_results. Now, we will look at one of the functions which allow us to send data to match_results. Input and Output Streams - Hierarchy In this lesson, we will get insight into the structure of input/output streams. Input and Output Streams - Input and Output Functions Apart from ‘cin’ and ‘cout’, there are many other functions we can use to perform input/output operations. Input and Output Streams - Iostream The most frequently used read/write stream is iostream. We’ll look at the implementation shortly. File Systems - Non-member functions Apart from the classes, C++ has pre-defined functions to help us fully use filesystem library. Input and Output Streams - User-defined Data Types We can also set our own preferences for the input and output operators. Regular Expressions - Regular Expression Objects Let’s take a look at the various types and grammars which C++ provides for regex objects. Input and Output Streams - String Streams The string stream family lets us store and manipulate strings. Input and Output Streams - State of the Stream Are there tools we can use in C++ which allow us to check the current condition of the stream? Flags answer this question. Multithreading - Memory Model Learn about multithreading in the C++ Standard Library and its memory model. File Systems - Classes Let’s take a look at the different components of the filesystem library. Multithreading - Condition Variables Let’s talk about condition variables that enable threads to wait until a particular condition occurs. Multithreading - Tasks Now that we’ve learned about threads, let’s discuss tasks for asynchronous programming. Regular Expressions - Search In this lesson, we’ll see the implementation of the second look-up function for regex statements: regex_search. Regular Expressions - Format Regular expressions can also specify the format of the target text. Find the implementation below. Multithreading - Threads Let’s dive into C++ threads and their lifecycle. Multithreading - Shared Variables Now that we’ve learnt about threads, let’s discuss information sharing between them. std::any, std::optional, and std::variant - std::any C++17 allows us to put our value in a safe container which can be accessed only when its type is specified. Welcome to std::any. Non-Modifying Algorithms - Count Elements Count algorithms assist us in counting the number of elements in a range which satisfy a certain predicate. Non-Modifying Algorithms - Search for Ranges within Ranges Need to acquire a sub-range from your existing range? std::search solves the problem efficiently. Unordered Associative Containers - Overview The main difference between unordered and ordered associative containers is the idea of sorted keys. Let’s find out how unordered containers handle keys.
About the C++ Standard Library including C++ 14 & C++ 17 (Rainer Grimm) category [C++ Standard Library including C++ 14 & C++ 17 (Rainer Grimm)] (1)
Doubt in the move line [Interface of All Containers - Assign and Swap] (4)