I certainly won't shed a tear over exception specification. ("A good idea which, unfortunately, never worked out.") All they ever were good for were what now noexcept
stands for.
But I had hoped that export
would make it. As the very least, export
would allow you to change helper functions for templates without having to re-compile all the code using those templates. And it would get us rid of all those detail
namespaces:
namespace detail { // actually we don't want this public, but can't avoid it
template<typename T>
void f_helper() { /*---*/ }
}
template<typename T>
void f() {detail::f_helper();}
void g() {f<int>();} // has to recompile if f_helper()'s implementation changes
Alas, since only one of the compilers I had to use during the last decade ever implemented it, I could never use it.
vector<bool>
as well. – Compressorvector<char>
or similar, which seems absurd. – Explorationvector<bool
", goes to some length to make surevector<bool>
is mostly useless. The best link I have on it is gotw.ca/gotw/050.htm which points out that it isn't even a container class by the Standard definitions. And, yes, usevector<char>
or roll your own; whatever you do will be better thanvector<bool>
. – Compressorvector<bool>
is that it's easy to do. I never wrote an exception specification, and never usedexport
. It's easy to not do those. It's also easy to go along writing data structures and writevector<bool>
without thinking twice, and then you're potentially in trouble. – Compressor