Examples - Template Code Simplifications
Let’s see a couple of examples!
We'll cover the following...
We'll cover the following...
Line Printer
You might have already seen the below example in the Jump Start section at the beginning of this part of the course. Here, we’ll dive into the details.
linePrinter uses if constexpr to check the input type. Based on that, we can output additional messages. An interesting thing happens with the pointer type - when a pointer is detected the ...