From the course: Introducing Functional Programming in C++
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Enabling C++ 17 - C++ Tutorial
From the course: Introducing Functional Programming in C++
Enabling C++ 17
- [Instructor] To get the most functional features, we're going to build our code for C++ 17. We won't always need it, but it doesn't hurt to have it available. Each of the three big compilers, Microsoft, Clang and GCC has excellent C++ 17 support. Here are the command line flags to activate it. If you use CMake to build your programs, then it's easy to add C++ 17 support, simply add the line set CMake CXX standard space 17 near the top of your CMake list dot text file. That's all it takes. Let's build an actual C++ 17 program and pay attention to the command line options this time. Let's open Visual Studio Code we're going to go file, new and we'll begin by saying pound include and this is going to be iostream. Next we'll add a space and then we're going to have a name space and our usage here is going to be a little bit silly but it will test a compiler C++ 17 feature so we're going to say A colon colon, that's the scope resolution operator, B colon colon, C. This is C++ 17's nested…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Enabling C++ 174m 24s
-
(Locked)
transform instead of map5m 30s
-
(Locked)
copy_if instead of filter2m 59s
-
(Locked)
accumulate instead of reduce2m 51s
-
(Locked)
bind4m 56s
-
(Locked)
Functions6m 54s
-
(Locked)
Lambda functions: Curry3m 38s
-
(Locked)
Lambda functions: Closures2m 20s
-
(Locked)
Challenge: Factorial continuous add33s
-
(Locked)
Solution: Factorial continuous add3m 15s
-
(Locked)
-
-
-