What features would you like to see added soonest in your favorite C++ compiler?
herbsutter.com
herbsutter.com
template <class Entry, bool useParents> struct AvlTreeHelper { int balance; Entry \child[2]; static if (useParents) { Entry \parent; } };
template <...., bool useParents> void ...::insert (...) { ... static if (useParents) { // fixup parent pointers } ... }
Such optional behavior can be achieved with existing C++ features by inheriting specialized template classes, but it makes code very unreadable, especially when you have big functions with small conditional parts inside, or when you have more than one boolean condition.
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n332...
Even if it can't be solved generally (which seems likely since nobody's done it yet) just some special casing for STL containers and algorithms would go a long way.
We do not plan to support ISO C features that are not part of either C90 or ISO C++. I understand C programmers may be disappointed or angry with this answer and I'm sorry to have to say no here. It's true, and very quotable, that "focus means saying no," but that doesn't make it easy to say -- it is hard to say no to you, and I'm sorry to say it. But we have to choose a focus, and our focus is to implement and innovate in C++.