Liste des Groupes | Revenir à cl c |
Am 15.10.2024 um 05:30 schrieb DFS:Sure, because every time you start a new C app, you're starting from zero.On 10/13/2024 6:51 AM, Bonita Montero wrote:In lines of code. Imagine you would specialize a container likeAm 12.10.2024 um 23:37 schrieb Thiago Adams:>
>If you are afraid your constant is not constant expression put a static_assert. Then remove.>
This is unnecessary work if you have constexpr.
>(C++ is a TOTAL mess. const in C++ already could be used n constant expression)>
C++ is five to ten times less work for the same problem.
>
How do you measure "work'?
unordered_map by hand in C. That would be days of work. In C++
it's one line of code and you get nearly optimal performance.
Or just think about what an emplace_back on a vector of strings
all does; if the capacity isn't sufficient a doubled vector is
allocated (libstdc++, libc++), all objects are moved there and
a new item is emplaced at the end. That's one line of code, but
in C that's a half day's work.
Les messages affichés proviennent d'usenet.