top | item 42498707

(no title)

cshokie | 1 year ago

If you haven’t already look up ‘if constexpr’ in cpp17 and newer. It lets you have compile time branches in a single function.

discuss

order

mst|1 year ago

Also requires, which initially looks batshit insane but is in fact really quite cool: https://www.think-cell.com/en/career/devblog/if-constexpr-re...

Loranubi|1 year ago

> Unlike requires requires and requires { requires }, which are perfectly reasonable C++ code, requires requires { requires } is completely silly.

Normal day in cpp land...