Not really. It's not done by simply switching to a C++ compiler. The data types should be converted to object-oriented ones and the checking-every-functions-return-value-mentality should be rethought. Usage of STL containers would need to be considered in order to unleash C++ whole power. And we would still need a C abstraction layer for every public API-header to allow fluidsynth to be linked according to the C linkage spec. This is a pretty expensive job when done correctly.
One might think about using C++11 only as an OSAL (threading, atomics, mutexes, condition_vars): https://github.com/paulsapps/fluidsynth/commit/1cb572fcca0a09107d85b066c1a55bd55b7574ab Dont know about the portability of std c++11 libraries on other than Linux or Win. Also one would somehow need to get C++11's fixed width integers to work with C89 code (not sure if that's possible at all). Esp. getting atomics to work is non trivial. ...one might think about using some mixture of C11 / C++11, i.e. C11 for the atomics and cstdint part, C++11 for the threading part. Although C11 atomics seem to optional as well. Tom 2017-10-06 18:48 GMT+02:00 Philippe Simons <simons.phili...@gmail.com>: > damn! and I guess moving to C++11 is not an option > > On Fri, Oct 6, 2017 at 5:55 PM, Tom M. <tom.m...@googlemail.com> wrote: > >> This is for C++11 only. >> >> And as I just learned: The threading part of C11 is optional, which is >> very disappointing. Because it means that even though clang and gcc claim >> to be feature complete, glibc is (still) lacking support for the IMO most >> important part of C11: Threading ( see https://sourceware.org/bugzill >> a/show_bug.cgi?id=14092 ) >> >> Thus it is questionable if we can ever move to C11, even if one day also >> glibc has C11 Thread support. >> >> >> Tom >> >> >> 2017-10-06 16:56 GMT+02:00 Philippe Simons <simons.phili...@gmail.com>: >> >>> According to https://msdn.microsoft.com/en-us/library/hh567368.aspx >>> >>> VS2015 should have decent enough C11 support for threads and atomics. >>> Or is only for C++11 ? >>> >>> Philippe >>> >>> _______________________________________________ >>> fluid-dev mailing list >>> fluid-dev@nongnu.org >>> https://lists.nongnu.org/mailman/listinfo/fluid-dev >>> >>> >> >> _______________________________________________ >> fluid-dev mailing list >> fluid-dev@nongnu.org >> https://lists.nongnu.org/mailman/listinfo/fluid-dev >> >> > > _______________________________________________ > fluid-dev mailing list > fluid-dev@nongnu.org > https://lists.nongnu.org/mailman/listinfo/fluid-dev > >
_______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev