|
You are here |
www.lukas-barth.net | ||
| | | | |
brevzin.github.io
|
|
| | | | | C++17 gave us std::optional which is, in the words of a friend of mine, one of those really simple, ultra complex types - in the sense that it's very easy to understand and use properly, even for relatively inexperienced programmers... but extremely difficult to implement correctly, even for experts (another such is std::pair). Today, it's well over a thousand lines of code, most of which is critical to support even its most basic functionality. optional is the simplest sum type, and it appears in lots of different languages (and even has special syntax in Swift) under various related names - Maybe, Option, etc. - but in the languages I'm even nominally familiar with, it's about as simple to implement as it is to use. | |
| | | | |
www.foonathan.net
|
|
| | | | | Just like regular function parameters, template parameters can also have default parameters. For class templates, this behaves mostly just like default function arguments: if you pass fewer template arguments than required, default template arguments are used to fill the remaining places. However, for function templates, it gets more complicated as template parameters for functions can be deduced by the normal function arguments. This leads to some interesting side-effects. In particular, default argumen... | |
| | | | |
www.fluentcpp.com
|
|
| | | | | Variadic templates allow any number of template parameters of any type. In this article we see how to do a variadic number of parameters of the SAME type. | |
| | | | |
ciesie.com
|
|
| | | If you like writing programs in C, are interested in game development and dont enjoy all those complicated and ancient build systems I think Ive got something of interest to you. I belive there is something enjoyable in the simple setup Im describing below. Hope you will enjoy as well. Raylib Raylib is a C library made by @Ray San. On the Raylibs website it says raylib is a simple and easy-to-use library to learn video games programming. | ||