

If you include a header with a gazillion templated functions (namespace level or member functions, it doesn't matter) you are most likely to end up with only one or two instantiated in your binary. Only template functions that are actually used get instantiated. You may end up having identical templated functions emitted into several different translation units and the linker will chose one at link time, which is one major reason why C++ is slower to build. Pretty much everything else in the C++ standard library is template code in headers and gets instantiated when needed. a default ::operator new, some of the exception unwinding and RTTI mechanisms). Libstdc++.so (and libc++.so if you're bent that way) contain the standard stream objects, some standard string functions specialized on `char`, some threading and synchrony support and important parts of the C++ language runtime (eg. 1 rjones rjones 2901832 Sep 12 22:12 transmission-show 1 rjones rjones 3014872 Sep 12 22:12 transmission-remote 1 rjones rjones 2895128 Sep 12 22:12 transmission-edit 1 rjones rjones 2917136 Sep 12 22:12 transmission-create 1 rjones rjones 13725 Sep 12 22:12 Makefile 1 rjones rjones 287 Sep 12 22:12 CTestTestfile.cmake 1 rjones rjones 5645 Sep 12 22:12 cmake_install.cmake 6 rjones rjones 4096 Sep 12 22:12 CMakeFiles 1 rjones rjones 3073952 Sep 12 22:09 transmission-showĭrwxr-xr-x. 1 rjones rjones 3182928 Sep 12 22:09 transmission-remote 1 rjones rjones 3066256 Sep 12 22:09 transmission-edit 1 rjones rjones 3082448 Sep 12 22:09 transmission-create 1 rjones rjones 13793 Sep 12 22:08 Makefile 1 rjones rjones 289 Sep 12 22:08 CTestTestfile.cmake 1 rjones rjones 5653 Sep 12 22:08 cmake_install.cmake 6 rjones rjones 4096 Sep 12 22:08 CMakeFiles 1 rjones rjones 2959640 Sep 12 22:12 build-c/daemon/transmission-daemonĭrwxr-xr-x. 1 rjones rjones 3130352 Sep 12 22:09 build-c++/daemon/transmission-daemon 1 rjones rjones 3997408 Sep 12 22:12 build-c/gtk/transmission-gtk 1 rjones rjones 4167912 Sep 12 22:09 build-c++/gtk/transmission-gtk So I don't think this represents any argument for or against C vs C++. Edit: Please note the C++ code change doesn't actually use the STL, it really just changes the compiler and code style in a few places. Might have miscounted but looks something like

The need for web.c is debatable "webseed" is not peer-to-peer, who even uses it Needed to fix some libcurl problem in libtransmission/web.c, too Need to include bsdqueue.h instead of sys/queue.h in these two files These were reported by a musl user on Github years ago. Still had to make fixes by hand to get it to compile with musl. When statically compiled 2.94, stripped binaries were 3.4M not too bad When we untar the source, the "Changelog" file is emptyĭiff -U0 -r transmission-2.94 transmission-3.00|less Users should read through the changes before updating
