r/cpp • u/we_are_mammals • Mar 28 '23
Reddit++
C++ is getting more and more complex. The ISO C++ committee keeps adding new features based on its consensus. Let's remove C++ features based on Reddit's consensus.
In each comment, propose a C++ feature that you think should be banned in any new code. Vote up or down based on whether you agree.
765
Upvotes
14
u/fdwr fdwr@github 🔍 Mar 28 '23
Just last week. Was trying to call a function that takes a pointer to bool's + count, and thought I could store the values in an
std::vector. Nope! All the work-arounds (like temporary bool wrappers) required extra work. So I (semantically made me feel dirty, but worked) stuffed them into anstd::basic_string<bool>instead and then effortlessly called the function withs.data()ands.size(). 😅