3 ms·
If a developer is committed to using template-fu, then of course T* doesn't fit nicely with all the template magic, and the developer should use a template magi
by lowbloodsugar 5y ago
If a developer is committed to using template-fu, then of course T* doesn't fit nicely with all the template magic, and the developer should use a template magic version of T* which is 'optional'. For those who don't like template-fu, T* is way better than 'optional', not simply because 'optional' is a template and therefore bad, but because T* works just fine in this world. So I am confused by the point of this article. It's like saying "gasoline makes a poor diesel when used in my diesel engined car."
- strager 5y agoI agree. Just because T* has problems in some contexts doesn't mean optional<T&> should be used in all context.
- MauranKilom 5y ago> Just because T* has problems in some contexts doesn't mean optional<T&> should be used in all context. Where does the article suggest using optional<T&> in all contexts?