News for hackers. Stuff that matters.
Re:D is being used for autonomous driving research – Audi an... by patrec on Tuesday June 25, 2019 @05:55AM (#20272581)
A decent C++ compiler will also inline the sorting for something like:

    constexpr size_t N = 3;
    void sort_N(std::array<int, N> a){
         std::sort(std::begin(a), std::end(a));
    }

but I haven't checked if it does the same with qsort. But I agree with your larger point; I find the efficiency claims for C++ frequently overblown and the compile time burden substantial (OTOH it's still very hard, but slightly easier to write robust code in C++ compared to C).

There are no comments on this comment yet.