This is yet another workaround for hanging posix-cmake-test on Mac OS.
This enables parallel builds again, but uses Ninja build system instead
of Makefiles. Enabling parallel builds speeds up the build process and
releases Mac OS builders for other jobs sooner.
Additionally, fix incorrect apt invocations in CMake-related jobs. apt
is supposed to be used in interactive shells, and in scripts apt-get is
recommended. Also, apt-get update is needed before apt install, and
matrix.install must be transformed to a space-separated list. Also added
retries on network errors.
Properly set BUILD_JOBS environment variable in CMake-related jobs as
it is used in build and run steps. Without the variable being set, -j
without a number means "no limit on the number of jobs", which may
hit system resource limits and cause the job to fail.
Also, Mac OS seem to sometimes hang on too many parallel build jobs,
even if BUILD_JOBS is specified correctly. So disable parallel builds
for now.
Additionally, use GIT_FETCH_JOBS universally.
The feader defines a new functor class template that can be used to wrap
raw functions into a function object class. This is useful, for example,
for integrating std::unique_ptr and unique_resource with custom deleters
implemented as raw functions (e.g. in C libraries).
The rename allows to avoid forming an infinite recursion in compile time
(because of noexcept specification that needs to resolve the unqualified call
to swap) or run time (in case if the boost::swap function is the only one
suitable for the passed arguments).
To avoid the compile-time recursion, removed noexcept specification from
boost::swap. The specification is still present in boost::core::invoke_swap.
Deprecated boost::swap and associated headers. boost::core::invoke_swap
is defined in a new boost/core/invoke_swap.hpp header.
Updated docs and tests. Removed tests that check inclusion of deprecated
headers.
Fixes https://github.com/boostorg/core/issues/148.