4 ms·
A variant of (3) that seems close to ideal is to use conditionally defined functions as suggested, that someone else has already written and generously shared,
by BeeOnRope 8y ago
A variant of (3) that seems close to ideal is to use conditionally defined functions as suggested, that someone else has already written and generously shared, such as portable-snippets [0]. It has a component specifically to offer cross platform builtins with fallback/emulation on plaforms without direct support.
[0] https://github.com/nemequ/portable-snippets https://github.com/nemequ/portable-snippets
- exDM69 8y agoThanks for the link, that looks quite useful if compiler portability is needed. It's still more effort than option #2, but quite an acceptable trade-off.