## C++14/17 features used in f18
-The C++ dialect used in this project is a subset of the
+The C++ dialect used in this project constitutes a subset of the
standard C++ programming language and library features.
-We want it to be compatible with the LLVM C++ language
-subset in use at the time that we integrate with that
+We want our dialect to be compatible with the LLVM C++ language
+subset that will be in use at the time that we integrate with that
project.
We also want to maximize portability, future-proofing,
compile-time error checking, and use of best practices.
language standard in f18.
The most important of these are:
* sum types (discriminated unions) in the form of `std::variant`
+* `using` template parameter packs
+* generic lambdas with `auto` argument types
* product types in the form of `std::tuple`
* `std::optional`
+(`std::tuple` is actually a C++11 feature, but I include it
+in this list because it's not particularly well known.)
+
### Sum types
+First, some background information to explain the need for sum types
+in f18.
+
Fortran is notoriously problematic to lex and parse, as tokenization
depends on the state of the partial parse;
the language has no reserved words in the sense that C++ does.
Were we unable to use `std::variant` directly, we would likely
have chosen to implement a local `SumType` replacement; in the
-absence of C++17's ability of `using` a template parameter pack,
+absence of C++17's abilities of `using` a template parameter pack
+and allowing `auto` arguments in anonymous lambda functions,
it would be less convenient to use.
The other options for polymorphism in C++ at the level of C++11