The implementation in Boost.Core was based in unhandled_exception_count
in Boost.Log, therefore we remove our loca implementation in favor
of the common one.
If the text file sink backend used the file that was previously scanned
by file_collector as an old log file, on rotation the collector would
store a duplicate of the file info. If the file was removed due to
storage limits, the file info would still be stored despite the file
being deleted.
Also, in case if a file that is about to be rotated is deleted, don't
hard fail with an exception. This may happen if another process have deleted
the file or Boost.Log itself has. The latter can happen if multiple sinks
write directly into the common target storage and one of them invokes
file rotation, which due to the storage limits delete the file that
is currently being written by the other sink.
Boost.Build offers better compatibility with different compilers, some of
which use different flags for changing the default visibility. This also
slightly simplifies Boost.Log Jamfile.
Also use a more efficient and reliable save and restore code. The previous
implementation could potentially result in invalid code generated if the
memory reference generated by compiler involved ebx.
Periodic refreshes make sure that the 32-bit GetTickCount wraparounds are
properly counted even if the user doesn't call GetTickCount64 for extended
periods of time.
Also added an assert to document that length_until_boundary expects max_size
to be within the string size.
Made length_until_boundary implementation versions private and use
integral_constant to dispatch between them. It is slightly more lightweight
than mpl::bool_.
Apparently, gcc allows using inline namespaces even in C++03 mode, although it
generates -pedantic warnings. Suppress those warnings with __extension__.
This is a more long-term solution for strong using directive deprecation in
gcc 7. Suggested by Jonathan Wakely in:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83624
The example uses IPC queue operation_result as a namespace qualifier for
the values of the enum. This is allowed in C++11 and some compilers also allow
it in C++03. This is the preferred use of the enum values, so in the official
docs that kind of use is still displayed. For compatibility with C++03 though
an additional hidden code branch is added that refers to the constants without
qualification.
This should help avoid using members that were deprecated in C++17 and thus
improve compatibility with later language versions.
The commit also adds a new internal trait rebind_alloc that helps to portably
rebind the allocator to another allocated type. The trait also avoids
instantiation of std::allocator<void> which is also deprecated in C++17.
The strong using attribute is only used in C++03 mode precisely to emulate
the C++11 inline namespaces. The warning is misleading because in C++03
inline namespaces are not available and cannot be used.
Most of the symbols of Boost.WinAPI were moved to boost::winapi from
boost::detail::winapi, so the forward-declaration and the corresponding
constructor were declaring and using an unrelated struct.
The date and time values handled by Boost.Log are not supposed to exceed
uint32_t range most of the time. The possible exceptions are date/time
durations, which are currently handled by the same code path as the
date/time points. If durations become an issue, the code should be
reworked so that durations are handled separately by the formater.
Converting all of the implementation to uint64_t won't help since the
decomposed date/time is further converted to std::tm, which is unlikely to
have uint64_t-wide components.