 Hi. Hello, everyone. My name is Mahmoud. I'm a software engineering manager at Microsoft, currently leading the Microsoft Visual C++ Libraries team. Our teams are responsible for Microsoft's implementation of the standard C++ library. I'm here today to talk to you about the progress we have made so far towards implementing the latest C++ standard, aka C++20. I will be talking a little bit about MSVC-STL, then go into more details talking about what have been completed so far, what we're currently working on, and what's next, of course. Also, I want to tell you about a major change we have made in the way we develop the C++ library. We have recently moved our development to open source, so I would like to talk a little bit about that as well. Microsoft's implementation of the C++ library, also sometimes known as STL, is the version of the C++ library created for Windows. Most Windows C++ applications and libraries, and even Windows itself, are built on top of MSVC-STL. The STL is designed to be used with other components of the Microsoft Visual C++ Tool Set, including the compiler's front-end and back-end. However, we also support other compilers, including but not limited to Clang and Edge. As many of you may already know, the STL library is released as part of Visual Studio, and it also integrates really well with the Visual Studio tools, such as the VS debugger. Also, the STL is fully compliant with C++ standards. For example, last year, we have completed the implementation of the C++ 17, and since then, and even before that, we have been implementing C++ 20 features. Now, I'd like to use this opportunity to talk to you about the move to open source development on GitHub. Last year, specifically at the same time as CPCon 2019, we have announced our move to open source development. Moving to GitHub does not mean we would reduce or have reduced our contribution to STL's implementation. On the contrary, we are putting in a lot more resources to support this transition, and we will continue to implement C++ standard features as we've always been doing. So why really did we choose to open source the STL? First and foremost, we wanted to get closer, really close to our customers as well as the C++ community. With the move to open source, STL users will no longer need to wait weeks or months to get fixes to their bugs or find out if their favorite new features have been implemented. They will be able to track all development in real time. Even more, many will find it easier to file and track issues on GitHub, since both the issues and the code live in the same place. But that's not all. We wanted to make it even easier for us to contribute back to other open source libraries out there. For example, we are currently in the process of contributing car comp to libc++. There's also the aspect of code quality. With more eyes and more developers contributing to the code bees, we know that MSVC STL will become even more robust. Finally, with open source license we have in place, we are welcoming code contributions from the C++ wide community, which will, and already did, have a significant positive impact on the rate of implementing C++ features. So what exactly have we open sourced on GitHub? The STL, okay, let me bring my laser pointer. The STL, which is this part here, is what we have open sourced. The STL is part of a larger set of libraries that work together to make the C and the C++ runtime. The STL depends on the VC runtime, this box here, as well as the Windows SDK Universal CRT, sometimes known as the UCRT. This picture here is also available on GitHub, and you can take a look there as well. Let me talk a little bit about that. What issues the box is here. The VC runtime, together with static component VC startup, are part of the MSVSYS toolset, and they ship with Visual Studio. They provide the compiler mechanisms, such as global variables constructors and destructors, as well as the exception handling machinery, among other stuff. The UCRT, Universal CRT here, is part of the operating system. It provides a C library support, including functions such as printf, memory allocation, and so forth. It also serves as a shim on top of other Win32 APIs, such as those queues for open, fopen, and other functions in the CRT. The STL, here, is made of the headers, libraries, and when built, the binary is making the C++ standard library. At this time, only the STL is open source. However, we are hoping to open source additional libraries in the future, but we don't have any current plans yet. So what is the work we have completed so far to create the GitHub repo? Here's a quick overview. First, of course, we had, like any other company, we had to get approval to open source STL, which we've done. Once we got that, we immediately got working on cleaning our sources, organizing everything for open source. We also created CMake build scripts, moving from the internal MS build project system we had before. Then, we set up build agents using Azure pipelines to ensure there are no build issues in pull requests submitted, and also as part of our CI. The latest thing we have accomplished was moving our test infrastructure to the open as well, which enabled us to detect runtime issues and ensure the quote quality is never degraded by PRs coming in. So what are we going to do after that? We have a roadmap. That was on github.com.x of the STL wiki roadmap. First, we would like to finish migrating all of our existing bugs. We would like all the STL issues to be in one place, for us and everyone else to easily track. So we want to move those bugs from our internal database to GitHub. And we have started doing that, and we will continue to do that. Also, there are still some parts of the STL that don't currently build with CMake and Zeribu, specifically the CLR, components. We will fix that, and we will continue to have everything implemented or actually buildable by CMake. Of course, our main target has, and will continue to be, focusing on completing the C++ standard implementation, C++ 20 implementation, this one here. Finally, we have set a goal for ourselves to automate the process of merging the quote from GitHub repo to Visual Studio. So that process will be faster and less error prone. Now I'd like to take a minute to talk about the license we have in our GitHub repo. The license we have chosen is Apache version 2 with LLVM exceptions. Some of you may already know, or may have guessed from the name of the license, that this is the same one that's used by LLVM. We have chosen the license for several reasons, including its openness. So we won't limit our ability to portcode to and from other open source repos, such as C++ for example. However, this comes at a cost. The cost for having such an open license that it prevents us from accepting code provided under less open licenses, such as copy left ones. That may somewhat limit what we can accept. Another reason for using the Apache LLVM with exception for open source is that it has a specific clause that allows applications of libraries using the STL, the binary ones, to be distributed in binaries without any attribution. That ensured existing customers didn't have any disruption and didn't need to change the ways they shipped their products. Here's a look at that part of the license on GitHub Reap. So this one is available in our GitHub review at master license text, license or text. So this is the last section in that license. As it says here, embedded into our object form, which really means binaries, you may redistribute such embedded portions in such object form without complying with the conditions of section 4a, 4b, 4d of the license. That's a lot of legalese, but really section 4a, 4b and d talk specifically about software redistribution, which basically mean enabling anyone using the STL to embed or use the binaries created from the STL without having to comply with the attribution clause. Of course, software or other libraries that derive from the STL or any codes that derive from the STL will still need to continue to comply with those sections. So attribution is required. So next, to track all the code contributed to the repo, we have created a changelog. Here is GitHub.com, Microsoft, STL, Wiki changelog. The changelog outlines all the features implemented and boxfixed and shows the corresponding VS updates where each feature or boxfix has either shipped or if it's new code, it's going to plan to be the VS update where it will be planned to be shipped. We don't include the features implemented prior to open sourcing GitHub in that changelog. However, those can be found on docs.microsoft.com right here. So this is a nice graph. This graph shows the progress made so far in implementing C++ standards. It shows both C++ 17 and C++ 20. Also, it shows bugs and LWG issues we have been fixing. So highlighted line here, the orange one, together with the white axis here tells us the number of C++ 20 library features that have been either accepted and implemented. Issues and jumps here is a result of more features voted in as the various WG 21 meetings. While drops like this one or this one really mean that those have been implemented. As of today, there are 32 features remaining presenting approximately 30% of the total features voted in. C++ 17, the green line here, was mostly done around March, April timeframe of 2018. Except for the elementary string conversion, also known as carconf, which has been completed in August of last year. The red line here represents all the bugs that we still have. As I mentioned earlier, not all bugs are in GitHub yet, but we are working on that and we will be having every single GitHub server. Finally, the blue lines shows the progress towards implementing or fixing LWG issues in our code piece. So what features have we implemented? These are the features that have been completed prior to moving to GitHub. Together here, this shows the VS update. Each of the features have been implemented in. The VS update that those features have been implemented in. For example, actually all of them are C++ 20, except the first one C++ 17. Like I mentioned, elementary string conversion has been the last C++ 17. We have started development around VS 2017-15 or we have started releasing C++ 20 features around this VS 2017-15.7 update. And since then, we have been working on implementing C++ 20 features. VS 2019 update 16.5 is the first release to contain community-contributed STL features. These are all the features contributed to STL GitHub repo that have shipped with VS 2019-16.5. I guess that's about $2,000 or so. In addition to the proposed paper, the table contains the GitHub. This is a paper here where each feature that each feature implements. And here's who has contributed those features. Some of the features have been contributed by MSVC team and others by external contributors. For example, CH Part 2 as Charlie is on our team. Superwig, Nathan, they are all not on our team directly, but have been contributing to C++. The last column here is the issue. So GH9 really means the issue number 9 on the GitHub repo. By the way, these slides are going to be shared and I'll be showing the link to where these slides are going to be shared at the end of this talk. All these are linkable. All these links are clickable. So you'll be able to follow the links showing the PRs when you click on the contributor here or the issue explaining more about what this feature implements. And these are all the features that have shipped in 16.6. All of those have also been implemented in GitHub. At the time of this talk, 16.6 is still in preview. So to get access to those features through Visual Studio, you will need to download the latest preview. Again, I'm going to show you links where you can download the preview if you don't already know that. Finally, we know that some features won't make it to 16.6. So we have started accumulating those in 16.7. So these are all the SCL GitHub features that are planned to go in 16.7 when the first preview ships. Of course, 16.7 haven't even started. It will start soon. So more expected to be added in the 16.7 timeframe. So the features I've been talking about are all those that we have together with the community implemented. So what's left? Here are all the features left, around 30 plus features. Representing about 30% of the library. Based on the current PRs in the pipeline on GitHub and the number of contributions made so far, including by the MSVC team and everyone else, C++ 20 features will probably be implemented or completed by early next year. That's a very good guess. Hopefully we'll be done by then. Now I'd like to highlight some of the important C++ 20 and one C++ 17 feature that we have implemented together with the community. In the next slides, I'll be talking about each of those. Also, I'll be demonstrating each one in code. The first one I'd like to highlight is contains for ordered and unordered associative containers. Contains for order and order and stress containers is one of the features that probably should have been added long time ago. As they make writing as that contains function, make writing lookup code much easier, especially for newcomers to the C++ programming language. It provides a much simpler alternative to more complicated and non-obvious code, such as the one presented here. I'll give you a minute to look at this code and then I'll move to the demo or the next slide actually. So this table from cpreference.com, which I'm sure most of you know about already, shows which containers have implemented contains, the function contains in C++ 20. This highlighted box here. So these are all the associative and ordered and unordered associative containers. List, set, multi-set, and so on. Next, let's look at a quick demo of contains. Okay, the first demo we have is for associative containers, contains. We have here very two simple examples on how to use contains. The first one is for a set, which is unordered, and the second one is unordered map contains demo. Here we have an array of numbers, and we are going to look for a specific key in that array. Similarly, in the unordered map, we have pairs that we are going to look into for a specific key. So this first one, we will be looking for 10 and 30. Cool, 30 is not there, but 10 is similarly, 10 and 30 is the second one, which is unordered map. Let's look at an example. Okay, so this was our test here. 10 found, yes, 30, no, 10, 30, no. Okay, let's go back to the slides. Another feature that I'd like to talk about is starts with and end with for strings and string views. As the name says, starts with and end with is probably self-explanatory. It looks for a string and provides a Boolean that says whether a string starts with a given string or another string ends with a given one. It works for both basic string and string view. Similar to contains, those are functions that makes writing C++ a lot easier. I'm not really sure if we're going to see more string helps in the future, but this is a good start, and I'm sure it'll be nice to see more. Let's quickly demo starts with and ends with. Continuing the trend of functions that simplify programming, especially for newcomers to the programming language, we have starts with and begin with. I have two demos here, one for string and one for string view. In both demos, we will be, in both examples here, we will be looking for a string, and in some of those cases, we will find it starts with and other cases we want. For example here, C++ 20 demo, does this starts with C++? We'll see if it's true or false. Starts with Java, probably not, so we'll see that. Similarly ends with demo, of course, demo is different from small letter demo, is different from capital letter demo. Second example, we will be looking at string view. It is the same, it's almost the same example, so let's look at it here. So does C++ 20 demo start with C++? Yes, demo starts with Java, false, and continue. We could also search for a car, rather a character, rather than a string, so that works as well. And the second demo has the same things work for it as well. Let's go back to the slides. This proposal introduced a new type, char8 underscore t. I'll just be calling car8t for now. I don't really know the right pronunciation, but car8t sounds good. The new type introduced solves the gap in the library. C++ 11 have added utf8, utf16, and utf32 string literals. Also new types, car16t and car32t were added for utf16 and utf32, respectively. But no new type was added specifically for utf8, until now at least. So in addition to the new car8 type introduced by this proposal, the proposal has added the necessary machinery for it to work with other types and algorithms, including a new US string, alias, and a new file system pass constructor with char8t. The following demo shows how to use a new type. Let's take a look at the char8t demo here. One of the first things I want to point out, because this is not standard, is because we are going to print utf8 characters outside the ASCII that are non-ASCII, then I would need to set the mode. I would need to first of all to print them in white car, and then I would need to set the mode for the console stood out to be utf16, which will allow us to print white car strings in Windows. Similarly, because I can't print directly ASCII characters, I would need some say, or utf8 strings directly to the console. I'm going to be converting them to W strings, using multi-byte white car Win32 API, and this will be a helper function used throughout the sample code. I'm pointing those out because these two are non-standard, and in case you want to use that code for anything other than Windows, you will need to replace them with something else. The first part of the sample is a general use case. Here I demonstrate the usage of algorithms such as starswiz, and these are two different ways that I can pass a ut string, either directly from studio ut string aliased string, or as console car ut console car 8 pointer here. And the first one I'm using actually is actual characters, that are passed here, that are inside the search string, but in the second one they are a bit different. They don't have all the accents on the T and I here, so let's see what will happen when I search for those. Also, another part of the example is about hash, so it tries to compare u8 strings to white car strings, the hash functions for those. Let's see if they are going to be the same or different for the same strings. First of all, as expected, it was able to find the characters with accent, the strings that have the same accents as the string, but not the ones that have no accents here. Also, as we found out that the hash for the u8 string is different than the one for the white car string. Here they are different. Now let's take a look quickly at paths. So path here has had a few changes. First of all, the u8 path has been deprecated. If you build that, you will get the warning here with the deprecation that has been added to the library. Also, another constructor to path has been added, which uses a u8 string here. And then let's try to run that and see if the components of the path are going to be displayed correctly or not. Yep, here we have them. So everything, some file and some accents, yep, we have it. And the file name was correctly specified together with the relative path and the extension. I believe that will be very helpful, especially in Windows where we have lots of paths that are not in ASCII only. B0-919 has added a trogeneous lookup to unordered associative containers. Those are the list, set, and map, as well as a multi-set and multi-map. So what does that do? It improves the lookup performance when different but compatible types are provided for the lookup. With this proposal, there is no need to create a temporary or a copy of the key object passed to the lookup functions. The new behavior is similar to the ones that are already in ordered containers. Let's take a look at the code. In the heterogeneous unordered lookup demo, we have two examples, one for unordered map and another for unordered set. We also have structs that are going to be used for the template arguments. I'm going to note here about the second one. It's not strictly required after a refinement to the proposal, so it can be replaced with something like stud equal to. Here we have an unordered map and it appears here, stud string and int. We are going to look for the key in each of them one time using the same type, which is a string, another time using a different kind, which is a different type, which is a string view. Prior to C++20, that will not work. Over C++20, we can actually use those alias type in unordered heterogeneous, unordered containers, mainly because of this proposal. Let's have a demo, quick one. So here we look for apples, which is an unordered map. So that was a string found. Basically, the string view could not be found. Our banana was a string view and that was found. There was no issues. Ornages, which is a string, it could not be, it actually was found. An order set is almost the same, so I'm not going to go through that example. Karkov or elementary string conversion. This is the only C++17 feature we will be looking at today. As you know, it's also the last feature we have implemented in C++17. Elementary string conversions add two new functions from cars and two cars in the Karkov header. Those functions are used to convert between strings and numbers. The rationale behind introducing those functions is to overcome the shortcomings of existing ones primarily in terms of performance. All existing functions, example, sprintf and a2i and a2l, take into account locale and some cases string formatting, which result in a performance hit for most of those, especially when we don't need to do any string formatting on where locale is not needed. From cars and two cars are non-throwing and locale-independent and thus can provide significant performance improvements when string conversions from and to numbers is needed. Moreover, MSVC's implementation of those functions STL is based on Rue's algorithm. It's much more optimized than whatever we had before for existing functions and which has given us, has given us quite a lot of performance improvement. Stephens' talk here about Karkov during last year's CVCon has a lot more details. So if you haven't watched it, I'd encourage you to do so. Here's a demo for Karkov. Okay, it's a Karkov demo or as is known in the proposal elementary string conversion. So here we are going to state two functions, two cars and from cars. First one, it basically converts from a number a numeric value into a string. Two cars requires that you provide the size of the string through the first and last and it's going to convert it based on the inputs. So sometimes you can provide something like the base, for example, by default we are base 10, however we can do something like provide base 16 for hex or base 2 for binary. Of course, it can also do floating point numbers and you can even specify different notation, for example scientific notation for your output. As well as the precision used for that scientific notation. Here are various options. So I'm going to run it now. No surprises here. The first one is an end value, hex or regular base 10 value, hex binary. You could have specified, of course, precision for that floating point number, but we didn't so it uses a default and finding the scientific one was 1, 2, 3, 4, 5, 6 precision. So AC, that's the error code. In all those cases, we could have defined N errors. So it just returns zero. From cars, expected just opposite. For simplicity, we will be using the input array to convert from string to a numeric value. And we're going to, in each of those cases, we're going to print that numeric value. We're also going to print the result similar to two cars, demo, and UC. Let's see how that will work. It's worth noting that at the end, I'm adding an input which is not valid and Val cannot be translated into any numbers. So we're expecting it to be, to at least upload something that says this is not valid. From cars, so 20, 20, 3.14, 12, 120,000, 12 each part four. It printed the hex, the decimal representation of that hex value. Yeah, this one similarly is printed the decimal representation of that binary value. And finally, the last one is e to the, which equals to e in Val, which is an invalid input. Let's go back to slides. So starting with updates 16.5, Visual Studio has started including community contributed code from GitHub. This feature has been contributed by Superwig. The link above is for support request for that contribution. Thank you, Superwig. The new arrays and erasing functions are part of the library fundamentals TS. Remove and remove if have existed in the STL for a very long time. And they certainly can help with erasing elements of the container. However, as highlighted by the paper, the correct pattern for calling remove and remove if, that pattern is not always followed correctly. Erase and erase if help erase those common mistakes. The proposal contains any depth explanation for why that happens. So I'm going to leave to you as an exercise to read more why erase is sometimes a better option. Here's a demo of the new functions. In this demo, I'm going to show the new functions to do raise and to do erase if. We have one example for each. You also have a couple of helper functions to print the types that are going to make use of raise. And if you have the functions to be used with erase, if is vowel is odd, is first odd is really for appear. So basically comparing or checking gives a first element in that beer is odd or not. First one is erase. You can erase a character inside a string or you can erase elements inside the vector or inside the list among other things. First one will remove you from the string visual studio. One thing worth noting is the study experimental functions of the same name have been deprecated. So if you try to uncomment this and compile it, it will give you the warning that you see here. The second demo or the second example, we are going to use erase if. And we similar to the first one, we are going to print the list before and after erasing the value given. Erase if takes a container and a function or a structure is a function that turns a bool through if you should be erasing it or false otherwise. So for example in this, we want to erase odd one. So one, three, five and seven and so on should be erased. Here the function will erase only the first odd. So if the first member of the first element is appear and this map is odd, then it's going to be erased. So one, ten, three, thirty, five, fifty and so on. Then all the map is just the same. Let's take a quick look at the demo. So in each of these, you can see before erasing after it. So first one, this has been the easiest. So I has been, sorry, you has been erased. Visual studios when I was at the studio, nice name. And the number of elements have been decremented appropriately accordingly in each of the examples. Here it has removed all the vowels. Of course erase if it is a much more versatile versatile tool and can be used in a number of ways. Let's go back to the slides. Is constant evaluated? This feature is contributed by Jennifer and Stefan from the MSVC team who work on the compiler and libraries teams respectively. The feature is also both a mix of compiler and standard library features. Is constant evaluated allows developers to know if an expression in their program will be evaluated as constant at compile time. Depending on the result of that evaluation, they can provide different implementations for each. The people have several, have several good examples that explain when the use of the evaluation will be useful. Also, here's a demo showing how it can be used. Is constant evaluated is a very useful function whenever we want to optimize based on the knowledge whether the compiler is evaluating an expression as a constant or not. So in these examples, we are altering how square works if it is constant. Similarly, so if it's constant, we just add a thousand. It's a very large number, so we can easily recognize it as output. Similarly, we look at cube. We also add a very large number here, 2000 to the output. And then we look at all the cases here. We have various cases. The squiggles here is valid. It's been, the IDE is warning us that because square is a constant expression, then we could actually add constant exploits at the end. However, we're not adding that to see how the compiler was a compiler would do. This is the same case here. However, in the case of cube, it didn't give us a similar warning, mainly because in cube is not constant. We would need to comment that to see it for ourselves. Let's look at all these examples and see the output and compare it to how each function is defined or how each expression is declared. So in the first case, there's no constant or constant express, so we get a small number, which means it actually didn't go through the optimizer. So we print this actual value. In the second and third cases, it actually didn't go through the optimizer because constant and constant express mean meant the compiler is actually evaluated as a constant expression. So it's constantly evaluated. It's true. As a final example, because, or at least a final example from square, we passed val e, which is not a constant argument, so it could evaluate this constant. Of course, in these two, the cube examples, it wasn't able to evaluate it as a constant, mainly because cube is not constant itself. Now, we don't have an example similar to constant express here, like this one, mainly because the compiler would fail to build that because cube is not constant express. Okay, let's go back to the slides now. Constant express for algorithms and utility. This is another feature related to constant express. It's being contributed by Billy from the MSVC library team. This feature doesn't add any new functions. Instead, it adds constant express modifiers to functions in algorithms and utility headers. There are a few other C plus 20 accepted proposals that also propose adding constant express to existing functions. However, I guess this one is the largest in terms of the number of constant express modified edit. By adding constant express algorithms functions, those algorithms can in turn be used in other constant express functions or expressions. Here's a demo showing when that would be useful. So, constant express for algorithms. Previously, in C plus 17, many of the algorithms in these examples here did not have the constant express modifier applied to them. However, with a proposal here, P0202, the constant express modifier has been applied to many, in fact, most of the algorithms and algorithm header as well as the utility header. So, let's look at some of the examples that did not build before. This is the only one that would have built in 2017. However, all the other examples here wouldn't have been built, mainly because corresponding algorithms in 17 did not have the constant express modifier. An interesting example apart from the ones using constant express static assert, which uses the same mechanism under zone. So now because something like this is sorted, because we added the constant express to a sorted algorithm, now something like this will work. Of course, if you actually change the array to be something like 1, 3, 4, 5, for examples, and something like this would not build. Here are a few other examples for functions that could be compiled with constant express, mainly because the code inside it have algorithms that has a constant express modifier applied. Span. Span is one of the most popular library features of C++20. Span's implementation has been contributed by Misgu and has been included in VS 2019-16.6. Conceptually, Span is a struct that contains two key members, a pointer to a contiguous sequence of elements and a count of those elements. It's a commonly used pattern, or at least Span encapsulates a commonly used pattern. So this proposal adds to the standard library through a new type. It's to Span, a new header, Span. The new type is lightweight and has been designed as a value type, so it should be cheap to construct and use. Also, some of you may have already used the type with the same name from the GSL library. Both GSL Span and Span provide similar functionalities. In fact, Span's proposal is based originally on GSL Span. And with version 3.0 of GSL Span, both types are now more aligned than ever. However, there are a couple of differences. Mainly, GSL Span adds bounce checking. Also, GSL Span can be used in any C++ version starting with 14, including 17 and 20. Whilst to Span is C++20 only, you can read more about GSL Span in the blog post shown here. Okay, here's a demo for us to Span. For the Span demo, we will show how to create a Span, modify the elements inside it, as well as how to iterate over the elements inside the Span. Creation is straightforward. You basically pass, provide type as your template argument, and pass whatever type you that is allowed by Span. Vectors in a RAID, in a RAID, all of these types are okay. Mainly because they have a contiguous range of elements that you can, that Span can make yourself. So in the second example, modify, we actually try to iterate over all the elements and change the first letter to the upper case width. So S and V and C are going to all be changed to the upper case of them. And in the final example here, we show different ways of iterating over the elements as Span points to. So this example here is a column or use the normal begin, the ones that are commonly used for iterating over containers begin and end, or even use the old-fashioned from int i equal 0 to or size ti equal 0 to to the end of the elements. We have a couple of helper functions to print here, print Span. So print Span will print all the elements inside the Span together with a size. Let's take a look, see how that works. First, in the create Span demo, after creating each of those elements, we print, so print Span, so elements one to four works, print Span from the vector directly, or from another Span, which of course will have the same element, or using the begin and end members of the vector. As a modifier, as you can see before and after, so before we had the elements inside were not, did not start with an upper case, but after we defined the first character for each of them to upper, now they are all upper case, start with an upper case. For iteration, the second one is the most interesting because we were able to iterate from end to beginning. That's why we use a reverse begin, R begin and R end here, R begin to R end. Now let's go back to the slides. The last feature I'd like to demo today, but certainly not the least, is ranges. I guess it's popular enough, so I won't spend too much time explaining what it does. However, there are a couple of things I'd like to mention about ranges. First, it's a really big feature, really big. The merged one ranges proposal is 223 pages long, which makes it very, takes a very long time to implement, and review of course. Also ranges is the first C++20 feature that makes use of C++20, C++20 concepts. MSVC toolset has implemented the compiler and library component of concepts in VS 2019 update 16.3. Since then, Casey Carter has been a contributor for ranges features. He has been contributing ranges features to MSVC, SCL, CSN. Here's a look at the progress made so far. The starting point for ranges implementation has been the completion of concepts, and since then a lot has been implemented, including some machinery, including some concepts, I think all the concepts have been implemented, and some algorithms as well. Not all ranges features have been done yet, so they won't be easy to demonstrate today. So for my next demo, I'll be showing one of the relatively complete features of ranges, which is ranges algorithms. Here it is. This is our ranges demo, our final demo for today, and we are going to focus on the ranges algorithm. There are various algorithms that have been implemented for ranges, however, we are going to focus on these three only copy, copy, and find, and any off. We also have a few helper functions to help us with demonstrating how the ranges algorithms work. The first one is a copy. A copy from one range to another, or just copy if, very similar to the other, like raise if is the one we have used. In this one, for example, it will only copy numbers that are divisible by three, or in this one, it uses lambda function to determine if the numbers are positive or actually not negative, so anything zero or larger will be copied. We're going to try to find elements as an element, the number 23, and this array of stood pairs using the get second. So this is very powerful. It allows us to combine several things into one, so we're going to focus on the second element only, so we're trying to find anything that ends with 23. So there's only one here, for example, so that will return true. Here, we're trying to see if one of the first elements appear, have 73 or not? Obviously, it doesn't, so this one should return false. The final demo is for the any off algorithms for ranges, ranges any off, and for that example, we are going to make use of two functions, even is odd, and we are going to only copy, sorry, we're going to look for values inside our pair where it's either even or odd, and one time using the first element in the pair, and the second time using the second element in the pair. So let's take a look at how this works. So there's a copy demo. The first one was straightforward, copied everything. The second one, it only copied numbers that are divisible by three. And the third one, it copied only functions, sorry, values that are not negative, 0, 15, 25. And obviously, of course, it copied them the same order they were created. No surprises in the find in ranges. So everything that ended in 23, which is really only one, was found. However, nothing that started with seven to three could be found. Finally, in the any of demo, the output was based on if it's even or odd. So a range that has even first, yes, it's found some, yes, no, it didn't have anything, nothing has an even second, everything adds an odd number 13, 13, 13. However, there are odd first and odd like seven here, and odd seconds, which is really everything. Okay, that has been our last demo for today. Let's go back to our presentation. We are almost at the end of our presentation. Thank you for staying with me so far. The last thing I'd like to talk to you about today is what we can do together to make the STL a better library. First, I'd like to ask you to try the latest and greatest features of the STL, which you can find as a GitHub repo. Or if you prefer, you can download the latest preview of yes, which will also contain the latest maybe not the up to date exactly with the GitHub, but it will contain the latest merged from GitHub. If you have any questions about STL features or questions, then please report it in GitHub. If you have any other questions about Visual Studio, or any other general questions about C++, then that are not STL specific example about the compiler or other library libraries out there, then the VS developer community is a larger forum, and that can be used for asking such questions. Finally, I'd like to say big, big thank you very much for the wonderful community contributors to the STL GitHub repo. By contributing code and time and asking questions and opening issues, you are making a real difference in the C++ community. Once again, thank you. Here are some useful links you already know about the GitHub repo. I believe I've mentioned around 12,000 times or so, so you must know it by far. Microsoft STL or GitHub.com. This is a link for the C++ STL reference. And finally, the Visual, sorry, the virtual CPP repo at GitHub.com under Msola MSFT is where you can find this PowerPoint presentation as well as NAO's demo code. Okay. We have reached the end of this presentation, so thank you, everyone. Please enjoy the rest of virtual CPP, and please stay safe.