> > * If your compiler supports C++17, this should work without any external
> > dependencies(apart from APR).  Other compilers will require boost.
>
> Great and obviously a lot of work! Though, I've ran into multiple
> problems with my old C++-Builder 10.2 UPD 3 with 32 Bit BCC-compiler.
> "boost::atomic" doesn't seem to be available and you are using
> language constructs not supported yet, like the following:
>
> https://stackoverflow.com/a/2795024/2055163
>

That was one area that I wasn't sure of, if that would work with your
system.  The atomics are also not strictly needed, but they provide a
convenient lock-free way of setting variables without locking the
mutex.  I ran into a number of problems with recursive mutex locking,
so atomics sidesteps that issue.  It's also likely slightly faster,
since you don't need to lock and unlock the mutex, although with a
modern system it's probably not noticeable.

> It seems worth it discussing (again) if such old compilers should be
> supported at all anymore or not. I'm not sure if there was a concrete
> result in the end sayong only C++11 and newer or alike.
>

I feel that requiring at least C++11 is perfectly reasonable at this
point.  The latest release is a good choice for legacy systems, and if
needed we can branch from the last release(or from the current master
version) to give updates for those platforms.

New code is also much easier to implement with newer C++ features, and
has the potential for better optimization using move semantics for
example.  There are a few features that BCC32X doesn't support from
C++11, but those should be easy enough to work around(thread_local
being an example).  Some other compilers took a while to implement the
C++11 features, although those should be pretty rare at this
point(e.g. MSVC before 2015).  Oddly enough, the newer C++ versions
seem to have better support in older compilers(e.g. they were
implemented by compiler vendors faster than C++11).

Requiring C++11 also simplifies some code - as you saw, I left in some
std::shared_ptrs around instead of log4cxx::pointer, but the code that
detects for C++ wouldn't be needed if we can assume that it already
exists(some detection code for C++14/17 features would still be
required).

-Robert Middleton

Reply via email to