420chan now has a web-based IRC client available, right here
Leave these fields empty (spam trap):
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists


Community Updates

420chan now supports HTTPS! If you find any issues, you may report them in this thread
C++ Templates beyound trivial stuff by Nell Nagglefot - Sat, 02 Dec 2017 15:40:10 EST ID:9QSfnS0r No.37248 Ignore Report Quick Reply
File: 1512247210926.jpg -(155896B / 152.24KB, 977x1488) Thumbnail displayed, click image for full size. 155896
What's the deal with C++ templates?
I'm looking for explanatory videos on it that is reasonably well produced
(not some autistic dude rambling to a screen recording)

Doesn't have to be a video though if it's well written. All explanations I've found so far don't give me any reason of why to use them at all (instead for instance method overloading)

Some time I'd need to for instance loads of static data that I could define by hand but still would like to take advantage of encapsulating things that resemble state machines in classes.
I use C++ for microcontrollers, never on a PC and some times access to hardware can't be done inside a class the straight forward way, like storing pointers to a hardware pin, timer register, etc... inside anything non-static.
Nicholas Banningpat - Sat, 02 Dec 2017 19:30:43 EST ID:v79vrqu4 No.37249 Ignore Report Quick Reply
Templates are about generics and generics are about types. You should understand the type system and how generics work if you want to call yourself a C++ programmer, but that's not to say your embedded code will suffer if you don't.
Nathaniel Clublingson - Sat, 02 Dec 2017 20:00:31 EST ID:BW3MomrQ No.37250 Ignore Report Quick Reply
For embedded code, you probably don't need templates for much. Maybe if you have 8, 16, and 32-bit data types you could write code that could use any of those interchangeably, but I don't think it'd be as useful for you as for someone writing for more flexible systems.

Report Post
Please be descriptive with report notes,
this helps staff resolve issues quicker.