clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I6bbb587615b9d6f158900201ca04a647cb3a8f96
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/fd/atomic.cpp b/src/fd/atomic.cpp
index df200e6..ce9dff2 100644
--- a/src/fd/atomic.cpp
+++ b/src/fd/atomic.cpp
@@ -1,10 +1,12 @@
-#include <cstdlib>
-#include <filesystem>
 #include <fmt/format.h>
+#include <sys/stat.h>
+
 #include <stdplus/fd/atomic.hpp>
 #include <stdplus/fd/managed.hpp>
 #include <stdplus/util/cexec.hpp>
-#include <sys/stat.h>
+
+#include <cstdlib>
+#include <filesystem>
 #include <system_error>
 #include <utility>
 
@@ -16,8 +18,8 @@
 static std::string makeTmpName(const std::filesystem::path& filename)
 {
     auto name = filename.filename();
-    auto path =
-        filename.parent_path() / fmt::format(".{}.XXXXXX", name.native());
+    auto path = filename.parent_path() /
+                fmt::format(".{}.XXXXXX", name.native());
     return path.native();
 }
 
@@ -38,8 +40,7 @@
     mode(mode),
     tmpname(!tmpl.empty() ? std::string(tmpl) : makeTmpName(filename)),
     fd(mktemp(tmpname))
-{
-}
+{}
 
 AtomicWriter::AtomicWriter(AtomicWriter&& other) :
     filename(std::move(other.filename)), mode(other.mode),
diff --git a/src/fd/create.cpp b/src/fd/create.cpp
index 2240a98..bfef66f 100644
--- a/src/fd/create.cpp
+++ b/src/fd/create.cpp
@@ -1,8 +1,9 @@
 #include <fcntl.h>
 #include <fmt/format.h>
+#include <sys/socket.h>
+
 #include <stdplus/fd/create.hpp>
 #include <stdplus/util/cexec.hpp>
-#include <sys/socket.h>
 
 namespace stdplus
 {
diff --git a/src/fd/dupable.cpp b/src/fd/dupable.cpp
index ce2cff1..d096d04 100644
--- a/src/fd/dupable.cpp
+++ b/src/fd/dupable.cpp
@@ -1,7 +1,9 @@
 #include <fcntl.h>
+
 #include <stdplus/fd/dupable.hpp>
 #include <stdplus/fd/ops.hpp>
 #include <stdplus/util/cexec.hpp>
+
 #include <utility>
 
 namespace stdplus
@@ -18,13 +20,9 @@
 
 } // namespace detail
 
-DupableFd::DupableFd() noexcept : handle(std::nullopt)
-{
-}
+DupableFd::DupableFd() noexcept : handle(std::nullopt) {}
 
-DupableFd::DupableFd(const int& fd) : handle(fd)
-{
-}
+DupableFd::DupableFd(const int& fd) : handle(fd) {}
 
 DupableFd::DupableFd(int&& fd) : handle(std::move(fd))
 {
diff --git a/src/fd/fmt.cpp b/src/fd/fmt.cpp
index 94d3bc1..1907ded 100644
--- a/src/fd/fmt.cpp
+++ b/src/fd/fmt.cpp
@@ -6,9 +6,7 @@
 namespace fd
 {
 
-FormatBuffer::FormatBuffer(Fd& fd, size_t max) : fd(fd), max(max)
-{
-}
+FormatBuffer::FormatBuffer(Fd& fd, size_t max) : fd(fd), max(max) {}
 
 FormatBuffer::~FormatBuffer() noexcept(false)
 {
diff --git a/src/fd/impl.cpp b/src/fd/impl.cpp
index 34b365f..1272fc8 100644
--- a/src/fd/impl.cpp
+++ b/src/fd/impl.cpp
@@ -1,13 +1,15 @@
 #include <fcntl.h>
 #include <fmt/format.h>
-#include <stdplus/exception.hpp>
-#include <stdplus/fd/impl.hpp>
-#include <stdplus/util/cexec.hpp>
-#include <string_view>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <unistd.h>
 
+#include <stdplus/exception.hpp>
+#include <stdplus/fd/impl.hpp>
+#include <stdplus/util/cexec.hpp>
+
+#include <string_view>
+
 namespace stdplus
 {
 namespace fd
@@ -35,8 +37,8 @@
 
 std::span<std::byte> FdImpl::recv(std::span<std::byte> buf, RecvFlags flags)
 {
-    ssize_t amt =
-        ::recv(get(), buf.data(), buf.size(), static_cast<int>(flags));
+    ssize_t amt = ::recv(get(), buf.data(), buf.size(),
+                         static_cast<int>(flags));
     if (amt == -1)
     {
         if (errno == EAGAIN || errno == EWOULDBLOCK)
@@ -69,8 +71,8 @@
 std::span<const std::byte> FdImpl::send(std::span<const std::byte> data,
                                         SendFlags flags)
 {
-    ssize_t amt =
-        ::send(get(), data.data(), data.size(), static_cast<int>(flags));
+    ssize_t amt = ::send(get(), data.data(), data.size(),
+                         static_cast<int>(flags));
     if (amt == -1)
     {
         if (errno == EAGAIN || errno == EWOULDBLOCK)
diff --git a/src/fd/line.cpp b/src/fd/line.cpp
index db12041..b3ce76a 100644
--- a/src/fd/line.cpp
+++ b/src/fd/line.cpp
@@ -1,16 +1,15 @@
-#include <cstring>
 #include <stdplus/exception.hpp>
 #include <stdplus/fd/line.hpp>
 #include <stdplus/fd/ops.hpp>
 
+#include <cstring>
+
 namespace stdplus
 {
 namespace fd
 {
 
-LineReader::LineReader(Fd& fd) : fd(fd)
-{
-}
+LineReader::LineReader(Fd& fd) : fd(fd) {}
 
 const std::string* LineReader::readLine()
 {
diff --git a/src/fd/managed.cpp b/src/fd/managed.cpp
index 1b19284..cd4ec1c 100644
--- a/src/fd/managed.cpp
+++ b/src/fd/managed.cpp
@@ -1,9 +1,11 @@
 #include <fmt/format.h>
+#include <unistd.h>
+
 #include <stdplus/fd/dupable.hpp>
 #include <stdplus/fd/managed.hpp>
 #include <stdplus/fd/ops.hpp>
 #include <stdplus/util/cexec.hpp>
-#include <unistd.h>
+
 #include <utility>
 
 namespace stdplus
@@ -20,9 +22,7 @@
 
 } // namespace detail
 
-ManagedFd::ManagedFd() noexcept : handle(std::nullopt)
-{
-}
+ManagedFd::ManagedFd() noexcept : handle(std::nullopt) {}
 
 ManagedFd::ManagedFd(int&& fd) : handle(std::move(fd))
 {
@@ -31,12 +31,9 @@
 
 ManagedFd::ManagedFd(DupableFd&& other) noexcept :
     handle(static_cast<detail::ManagedFdHandle&&>(other.handle))
-{
-}
+{}
 
-ManagedFd::ManagedFd(const DupableFd& other) : ManagedFd(DupableFd(other))
-{
-}
+ManagedFd::ManagedFd(const DupableFd& other) : ManagedFd(DupableFd(other)) {}
 
 ManagedFd& ManagedFd::operator=(DupableFd&& other) noexcept
 {
diff --git a/src/fd/mmap.cpp b/src/fd/mmap.cpp
index 079815d..1f5c211 100644
--- a/src/fd/mmap.cpp
+++ b/src/fd/mmap.cpp
@@ -9,8 +9,7 @@
 MMap::MMap(Fd& fd, std::span<std::byte> window, ProtFlags prot, MMapFlags flags,
            off_t offset) :
     mapping(fd.mmap(window, prot, flags, offset), fd)
-{
-}
+{}
 
 std::span<std::byte> MMap::get() const
 {
diff --git a/src/fd/ops.cpp b/src/fd/ops.cpp
index d47dbb3..e8f3636 100644
--- a/src/fd/ops.cpp
+++ b/src/fd/ops.cpp
@@ -1,6 +1,8 @@
 #include <fmt/format.h>
+
 #include <stdplus/exception.hpp>
 #include <stdplus/fd/ops.hpp>
+
 #include <utility>
 
 namespace stdplus
@@ -54,8 +56,8 @@
     std::span<Byte> ret;
     do
     {
-        auto r =
-            (fd.*fun)(data.subspan(ret.size()), std::forward<Args>(args)...);
+        auto r = (fd.*fun)(data.subspan(ret.size()),
+                           std::forward<Args>(args)...);
         if (ret.size() != 0 && r.size() == 0)
         {
             throw exception::WouldBlock(