That still has the issue of Quantity{-100} being a-ok as far as the compiler is concerned, but there are other things one can do (as the article alludes to).
My reading of this article wasn't to say that these things are impossible in C++, just that they're not the default or the first thing you try as a beginner is perfectly wrong.
#include <iostream>
struct Price { double x; };
struct Quantity { int x; };
void sendOrder(const char *symbol, bool buy, Quantity quantity, Price price) {
}int main(void) {
}If you're trying to get it to type check, you have to make a type first.
I don't appreciate these arguments, and view them as disingenuous.