891

Incase it doesn't show up:

you are viewing a single comment's thread
view the rest of the comments
[-] xthexder@l.sw0.com 3 points 2 months ago

It really depends what you're doing. The last big project I did with C++ templates was using them to make a lot of compile-time guarantees about concurrency locks so they don't need to be checked at runtime (thus trading my development time for faster performance). I was able to hide the majority of the templates from users of the library, and spent extra time writing custom static_assert messages.

C++ templates are in fact a compile-time turing complete language, as crazy as that sounds.

this post was submitted on 02 Sep 2024
891 points (99.1% liked)

Programmer Humor

32509 readers
466 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS