diff --git a/.clang-format b/.clang-format
index d43e884..28e3328 100644
--- a/.clang-format
+++ b/.clang-format
@@ -87,7 +87,7 @@
 IndentWrappedFunctionNames: true
 InsertNewlineAtEOF: true
 KeepEmptyLinesAtTheStartOfBlocks: false
-LambdaBodyIndentation: OuterScope
+LambdaBodyIndentation: Signature
 LineEnding: LF
 MacroBlockBegin: ''
 MacroBlockEnd:   ''
@@ -98,13 +98,14 @@
 ObjCSpaceBeforeProtocolList: true
 PackConstructorInitializers: BinPack
 PenaltyBreakAssignment: 25
-PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakBeforeFirstCallParameter: 50
 PenaltyBreakComment: 300
 PenaltyBreakFirstLessLess: 120
 PenaltyBreakString: 1000
+PenaltyBreakTemplateDeclaration: 10
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
-PenaltyIndentedWhitespace: 0
+PenaltyIndentedWhitespace: 1
 PointerAlignment: Left
 QualifierAlignment: Left
 ReferenceAlignment: Left
diff --git a/include-fd/stdplus/fd/intf.hpp b/include-fd/stdplus/fd/intf.hpp
index 293e514..70ff828 100644
--- a/include-fd/stdplus/fd/intf.hpp
+++ b/include-fd/stdplus/fd/intf.hpp
@@ -148,9 +148,9 @@
     virtual FileFlags fcntlGetfl() const = 0;
 
   protected:
-    virtual std::span<std::byte> mmap(std::span<std::byte> window,
-                                      ProtFlags prot, MMapFlags flags,
-                                      off_t offset) = 0;
+    virtual std::span<std::byte>
+        mmap(std::span<std::byte> window, ProtFlags prot, MMapFlags flags,
+             off_t offset) = 0;
     virtual void munmap(std::span<std::byte> window) = 0;
     friend class MMap;
 };
diff --git a/include-fd/stdplus/fd/mmap.hpp b/include-fd/stdplus/fd/mmap.hpp
index 2250ac0..f41f562 100644
--- a/include-fd/stdplus/fd/mmap.hpp
+++ b/include-fd/stdplus/fd/mmap.hpp
@@ -16,10 +16,10 @@
   public:
     inline MMap(Fd& fd, size_t window_size, ProtFlags prot, MMapFlags flags,
                 off_t offset) :
-        MMap(
-            fd,
-            std::span<std::byte>{static_cast<std::byte*>(nullptr), window_size},
-            prot, flags, offset)
+        MMap(fd,
+             std::span<std::byte>{static_cast<std::byte*>(nullptr),
+                                  window_size},
+             prot, flags, offset)
     {}
     MMap(Fd& fd, std::span<std::byte> window, ProtFlags prot, MMapFlags flags,
          off_t offset);
diff --git a/include-fd/stdplus/fd/ops.hpp b/include-fd/stdplus/fd/ops.hpp
index 20395ab..aa89217 100644
--- a/include-fd/stdplus/fd/ops.hpp
+++ b/include-fd/stdplus/fd/ops.hpp
@@ -32,9 +32,8 @@
                                  RecvFlags flags);
 std::span<const std::byte> writeAligned(Fd& fd, size_t align,
                                         std::span<const std::byte> data);
-std::span<const std::byte> sendAligned(Fd& fd, size_t align,
-                                       std::span<const std::byte> data,
-                                       SendFlags flags);
+std::span<const std::byte> sendAligned(
+    Fd& fd, size_t align, std::span<const std::byte> data, SendFlags flags);
 
 void verifyExact(size_t expected, size_t actual);
 
diff --git a/include/stdplus/concepts.hpp b/include/stdplus/concepts.hpp
index 374880c..a649dde 100644
--- a/include/stdplus/concepts.hpp
+++ b/include/stdplus/concepts.hpp
@@ -6,21 +6,14 @@
 {
 
 template <typename T, typename U>
-concept WeaklyEqualityComparableWith = requires(
-    const std::remove_reference_t<T>& t, const std::remove_reference_t<U>& u) {
-                                           {
-                                               t == u
-                                           } -> std::convertible_to<bool>;
-                                           {
-                                               t != u
-                                           } -> std::convertible_to<bool>;
-                                           {
-                                               u == t
-                                           } -> std::convertible_to<bool>;
-                                           {
-                                               u != t
-                                           } -> std::convertible_to<bool>;
-                                       };
+concept WeaklyEqualityComparableWith =
+    requires(const std::remove_reference_t<T>& t,
+             const std::remove_reference_t<U>& u) {
+        { t == u } -> std::convertible_to<bool>;
+        { t != u } -> std::convertible_to<bool>;
+        { u == t } -> std::convertible_to<bool>;
+        { u != t } -> std::convertible_to<bool>;
+    };
 
 template <typename T>
 concept TriviallyCopyable = std::is_trivially_copyable_v<T>;
diff --git a/include/stdplus/exception.hpp b/include/stdplus/exception.hpp
index f2d40f2..f41c8f5 100644
--- a/include/stdplus/exception.hpp
+++ b/include/stdplus/exception.hpp
@@ -33,26 +33,26 @@
 {
     return
         [f = std::move(f), file, line, func](auto&&... args) mutable noexcept {
-        try
-        {
-            return f(std::forward<decltype(args)>(args)...);
-        }
-        catch (const std::exception& e)
-        {
-            stdplus::print(stderr, "Ignoring({}:{} {}): {}\n", file, line, func,
-                           e.what());
-        }
-        catch (...)
-        {
-            stdplus::print(stderr, "Ignoring({}:{} {}): Invalid Error\n", file,
-                           line, func);
-        }
-        using Ret = std::invoke_result_t<decltype(f), decltype(args)...>;
-        if constexpr (!std::is_same_v<void, Ret>)
-        {
-            return Ret();
-        }
-    };
+            try
+            {
+                return f(std::forward<decltype(args)>(args)...);
+            }
+            catch (const std::exception& e)
+            {
+                stdplus::print(stderr, "Ignoring({}:{} {}): {}\n", file, line,
+                               func, e.what());
+            }
+            catch (...)
+            {
+                stdplus::print(stderr, "Ignoring({}:{} {}): Invalid Error\n",
+                               file, line, func);
+            }
+            using Ret = std::invoke_result_t<decltype(f), decltype(args)...>;
+            if constexpr (!std::is_same_v<void, Ret>)
+            {
+                return Ret();
+            }
+        };
 }
 
 template <typename F>
diff --git a/include/stdplus/function_view.hpp b/include/stdplus/function_view.hpp
index 21d0c81..ab988a4 100644
--- a/include/stdplus/function_view.hpp
+++ b/include/stdplus/function_view.hpp
@@ -62,8 +62,8 @@
     static_assert(sizeof(fun) == sizeof(memfun));
     void* obj;
 
-    inline function_view_base() : fun(nullptr), obj(nullptr){};
-    inline function_view_base(std::nullptr_t) : function_view_base(){};
+    inline function_view_base() : fun(nullptr), obj(nullptr) {};
+    inline function_view_base(std::nullptr_t) : function_view_base() {};
 
     template <bool Nx2>
     constexpr function_view_base(R (*f)(Args...) noexcept(Nx2)) noexcept :
@@ -74,8 +74,8 @@
         requires(!C && std::same_as<std::invoke_result_t<F, Args...>, R>)
     inline function_view_base(F& f) noexcept :
         memfun([](void* v, Args... args) {
-        return (*reinterpret_cast<F*>(v))(std::forward<Args>(args)...);
-    }),
+            return (*reinterpret_cast<F*>(v))(std::forward<Args>(args)...);
+        }),
         obj(std::addressof(f))
     {}
 
@@ -83,8 +83,9 @@
         requires std::same_as<std::invoke_result_t<F, Args...>, R>
     inline function_view_base(const F& f) noexcept :
         memfun([](void* v, Args... args) {
-        return (*reinterpret_cast<const F*>(v))(std::forward<Args>(args)...);
-    }),
+            return (*reinterpret_cast<const F*>(v))(
+                std::forward<Args>(args)...);
+        }),
         obj(const_cast<F*>(std::addressof(f)))
     {}
 
@@ -184,7 +185,8 @@
     -> function_view<R(Args...) const noexcept(Nx)>;
 
 template <typename F>
-function_view(F) -> function_view<
-    typename detail::FViewGuide<decltype(&F::operator())>::type>;
+function_view(F)
+    -> function_view<
+        typename detail::FViewGuide<decltype(&F::operator())>::type>;
 
 } // namespace stdplus
diff --git a/include/stdplus/handle/copyable.hpp b/include/stdplus/handle/copyable.hpp
index 3efa90b..14befd7 100644
--- a/include/stdplus/handle/copyable.hpp
+++ b/include/stdplus/handle/copyable.hpp
@@ -29,18 +29,21 @@
          *  @param[in] maybeV - Optional object being managed
          */
         template <typename... Vs>
-        constexpr explicit HandleF(const std::optional<T>& maybeV, Vs&&... vs) noexcept(
-            noexcept(MHandleF(std::nullopt, std::declval<Vs>()...)) && noexcept(
-                std::declval<HandleF>().reset(
-                    std::declval<const std::optional<T>&>()))) :
+        constexpr explicit HandleF(
+            const std::optional<T>& maybeV,
+            Vs&&... vs) noexcept(noexcept(MHandleF(std::nullopt,
+                                                   std::declval<Vs>()...)) &&
+                                 noexcept(std::declval<HandleF>().reset(
+                                     std::declval<
+                                         const std::optional<T>&>()))) :
             MHandleF(std::nullopt, std::forward<Vs>(vs)...)
         {
             reset(maybeV);
         }
         template <typename... Vs>
         constexpr explicit HandleF(const T& maybeV, Vs&&... vs) noexcept(
-            noexcept(MHandleF(std::nullopt, std::declval<Vs>()...)) && noexcept(
-                std::declval<HandleF>().reset(std::declval<const T&>()))) :
+            noexcept(MHandleF(std::nullopt, std::declval<Vs>()...)) &&
+            noexcept(std::declval<HandleF>().reset(std::declval<const T&>()))) :
             MHandleF(std::nullopt, std::forward<Vs>(vs)...)
         {
             reset(maybeV);
@@ -65,13 +68,11 @@
             MHandleF(std::move(maybeV), std::forward<Vs>(vs)...)
         {}
 
-        constexpr HandleF(const HandleF& other) noexcept(noexcept(MHandleF(
-            std::nullopt,
-            std::declval<const std::tuple<
-                As...>&>())) && noexcept(std::declval<HandleF>()
-                                             .reset(std::declval<
-                                                    const std::optional<
-                                                        T>&>()))) :
+        constexpr HandleF(const HandleF& other) noexcept(
+            noexcept(MHandleF(std::nullopt,
+                              std::declval<const std::tuple<As...>&>())) &&
+            noexcept(std::declval<HandleF>().reset(
+                std::declval<const std::optional<T>&>()))) :
             MHandleF(std::nullopt, other.as)
         {
             reset(other.maybe_value());
@@ -84,9 +85,9 @@
 
         constexpr HandleF& operator=(const HandleF& other) noexcept(
             noexcept(std::declval<HandleF>().reset()) &&
-            std::is_nothrow_copy_constructible_v<std::tuple<As...>>&& noexcept(
-                std::declval<HandleF>().reset(
-                    std::declval<const std::optional<T>&>())))
+            std::is_nothrow_copy_constructible_v<std::tuple<As...>> &&
+            noexcept(std::declval<HandleF>().reset(
+                std::declval<const std::optional<T>&>())))
         {
             if (this != &other)
             {
@@ -106,9 +107,9 @@
 
         using MHandleF::reset;
         constexpr void reset(const std::optional<T>& maybeV) noexcept(
-            ref_noexcept&& noexcept(std::declval<HandleF>().reset(
-                std::declval<T>())) && noexcept(std::declval<HandleF>()
-                                                    .reset()))
+            ref_noexcept &&
+            noexcept(std::declval<HandleF>().reset(std::declval<T>())) &&
+            noexcept(std::declval<HandleF>().reset()))
         {
             if (maybeV)
             {
@@ -119,8 +120,9 @@
                 reset();
             }
         }
-        constexpr void reset(const T& maybeV) noexcept(ref_noexcept&& noexcept(
-            std::declval<HandleF>().reset(std::declval<T>())))
+        constexpr void reset(const T& maybeV) noexcept(
+            ref_noexcept &&
+            noexcept(std::declval<HandleF>().reset(std::declval<T>())))
         {
             reset(doRef(maybeV, std::index_sequence_for<As...>()));
         }
diff --git a/include/stdplus/handle/managed.hpp b/include/stdplus/handle/managed.hpp
index d0a0ee5..04e0deb 100644
--- a/include/stdplus/handle/managed.hpp
+++ b/include/stdplus/handle/managed.hpp
@@ -44,18 +44,20 @@
          *  @param[in] maybeV - Maybe the object being managed
          */
         template <typename... Vs>
-        constexpr explicit HandleF(std::optional<T>&& maybeV, Vs&&... vs) noexcept(
-            std::is_nothrow_move_constructible_v<std::optional<T>>&& noexcept(
-                std::tuple<As...>(std::declval<Vs>()...))) :
-            as(std::forward<Vs>(vs)...),
-            maybeT(std::move(maybeV))
+        constexpr explicit HandleF(
+            std::optional<T>&& maybeV,
+            Vs&&... vs) noexcept(std::
+                                     is_nothrow_move_constructible_v<
+                                         std::optional<T>> &&
+                                 noexcept(std::tuple<As...>(
+                                     std::declval<Vs>()...))) :
+            as(std::forward<Vs>(vs)...), maybeT(std::move(maybeV))
         {}
         template <typename... Vs>
         constexpr explicit HandleF(T&& maybeV, Vs&&... vs) noexcept(
-            std::is_nothrow_move_constructible_v<std::optional<T>>&& noexcept(
-                std::tuple<As...>(std::declval<Vs>()...))) :
-            as(std::forward<Vs>(vs)...),
-            maybeT(std::move(maybeV))
+            std::is_nothrow_move_constructible_v<std::optional<T>> &&
+            noexcept(std::tuple<As...>(std::declval<Vs>()...))) :
+            as(std::forward<Vs>(vs)...), maybeT(std::move(maybeV))
         {}
 
         HandleF(const HandleF& other) = delete;
@@ -64,16 +66,15 @@
         constexpr HandleF(HandleF&& other) noexcept(
             std::is_nothrow_move_constructible_v<std::tuple<As...>> &&
             std::is_nothrow_move_constructible_v<std::optional<T>>) :
-            as(std::move(other.as)),
-            maybeT(std::move(other.maybeT))
+            as(std::move(other.as)), maybeT(std::move(other.maybeT))
         {
             other.maybeT = std::nullopt;
         }
 
         constexpr HandleF& operator=(HandleF&& other) noexcept(
-            std::is_nothrow_move_assignable_v<std::tuple<As...>>&& noexcept(
-                std::declval<HandleF>().reset(
-                    std::declval<std::optional<T>>())))
+            std::is_nothrow_move_assignable_v<std::tuple<As...>> &&
+            noexcept(std::declval<HandleF>().reset(
+                std::declval<std::optional<T>>())))
         {
             if (this != &other)
             {
@@ -86,8 +87,8 @@
 
         virtual ~HandleF() noexcept(
             std::is_nothrow_destructible_v<std::tuple<As...>> &&
-            std::is_nothrow_destructible_v<std::optional<T>>&& noexcept(
-                std::declval<HandleF>().reset()))
+            std::is_nothrow_destructible_v<std::optional<T>> &&
+            noexcept(std::declval<HandleF>().reset()))
         {
             reset();
         }
diff --git a/include/stdplus/hash.hpp b/include/stdplus/hash.hpp
index 5c521fa..cb93dcd 100644
--- a/include/stdplus/hash.hpp
+++ b/include/stdplus/hash.hpp
@@ -35,8 +35,8 @@
 template <typename T, typename... Ts>
 constexpr std::size_t
     hashMultiS(std::size_t seed, const T& t, const Ts&... ts) noexcept(
-        (noexcept(hashMultiS(0, std::declval<T>())) &&
-         ...&& noexcept(hashMultiS(0, std::declval<Ts>()))))
+        (noexcept(hashMultiS(0, std::declval<T>())) && ... &&
+         noexcept(hashMultiS(0, std::declval<Ts>()))))
 {
     return hashMultiS(hashMultiS(seed, t), ts...);
 }
@@ -57,8 +57,8 @@
 
 template <typename T, typename... Ts>
 constexpr std::size_t hashMulti(const T& t, const Ts&... ts) noexcept(
-    noexcept(hashMulti(std::declval<T>())) && noexcept(
-        detail::hashMultiS(0, std::declval<Ts>()...)))
+    noexcept(hashMulti(std::declval<T>())) &&
+    noexcept(detail::hashMultiS(0, std::declval<Ts>()...)))
 {
     return detail::hashMultiS(hashMulti(t), ts...);
 }
diff --git a/include/stdplus/net/addr/ip.hpp b/include/stdplus/net/addr/ip.hpp
index 715b9b4..dae3c15 100644
--- a/include/stdplus/net/addr/ip.hpp
+++ b/include/stdplus/net/addr/ip.hpp
@@ -387,8 +387,8 @@
                  std::same_as<Addr, InAnyAddr>;
 
 template <typename Addr>
-concept InAddrLike = InAddr<Addr> || std::same_as<Addr, in_addr> ||
-                     std::same_as<Addr, in6_addr>;
+concept InAddrLike =
+    InAddr<Addr> || std::same_as<Addr, in_addr> || std::same_as<Addr, in6_addr>;
 
 struct InAnyAddr : detail::InAnyAddrV
 {
diff --git a/include/stdplus/net/addr/sock.hpp b/include/stdplus/net/addr/sock.hpp
index 73b4edf..bec91bf 100644
--- a/include/stdplus/net/addr/sock.hpp
+++ b/include/stdplus/net/addr/sock.hpp
@@ -246,9 +246,9 @@
             throw std::invalid_argument("SockUAddr fromBuf");
         }
         const auto& sun = reinterpret_cast<const sockaddr_un&>(buf);
-        return SockUAddr{
-            detail::SockAddrUnsafe(),
-            {sun.sun_path, buf.len - offsetof(sockaddr_un, sun_path)}};
+        return SockUAddr{detail::SockAddrUnsafe(),
+                         {sun.sun_path,
+                          buf.len - offsetof(sockaddr_un, sun_path)}};
     }
 
     constexpr bool operator==(const SockUAddr& rhs) const noexcept
@@ -461,8 +461,8 @@
     using FromAddr = ToStr<In4Addr>;
     using FromDec = IntToStr<10, std::uint16_t>;
     // Addr + sep + port chars
-    static inline constexpr std::size_t buf_size = FromAddr::buf_size + 1 +
-                                                   FromDec::buf_size;
+    static inline constexpr std::size_t buf_size =
+        FromAddr::buf_size + 1 + FromDec::buf_size;
 
     template <typename CharT>
     constexpr CharT* operator()(CharT* buf, Sock4Addr v) const noexcept
@@ -501,8 +501,8 @@
     using FromAddr = ToStr<In6Addr>;
     using FromDec = IntToStr<10, std::uint16_t>;
     // Addr + sep + port chars
-    static inline constexpr std::size_t buf_size = FromAddr::buf_size + 1 +
-                                                   FromDec::buf_size;
+    static inline constexpr std::size_t buf_size =
+        FromAddr::buf_size + 1 + FromDec::buf_size;
 
     template <typename CharT>
     constexpr CharT* operator()(CharT* buf, Sock6Addr v) const noexcept
@@ -538,8 +538,8 @@
 struct ToStr<SockUAddr>
 {
     using type = SockUAddr;
-    static inline constexpr std::size_t buf_size = detail::upfx.size() +
-                                                   SockUAddr::maxLen;
+    static inline constexpr std::size_t buf_size =
+        detail::upfx.size() + SockUAddr::maxLen;
 
     template <typename CharT>
     constexpr CharT* operator()(CharT* buf, const SockUAddr& v) const noexcept
diff --git a/include/stdplus/net/addr/subnet.hpp b/include/stdplus/net/addr/subnet.hpp
index cbdce20..a28b3f6 100644
--- a/include/stdplus/net/addr/subnet.hpp
+++ b/include/stdplus/net/addr/subnet.hpp
@@ -19,6 +19,7 @@
     addr32Mask(std::ptrdiff_t pfx) noexcept
 {
     // NOLINTNEXTLINE(clang-analyzer-core.UndefinedBinaryOperatorResult)
+    // NOLINTNEXTLINE(clang-analyzer-core.BitwiseShift)
     auto v = ~uint32_t{0} << (32 - pfx);
     // Positive prefix check + mask to handle UB when the left shift becomes
     // more than 31 bits
diff --git a/include/stdplus/pinned.hpp b/include/stdplus/pinned.hpp
index dc2a17a..99deec1 100644
--- a/include/stdplus/pinned.hpp
+++ b/include/stdplus/pinned.hpp
@@ -47,8 +47,7 @@
 
     template <typename... Args>
     constexpr Pinned(Args&&... args) noexcept(
-        noexcept(CT(std::declval<Args>()...))) :
-        CT(std::forward<Args>(args)...)
+        noexcept(CT(std::declval<Args>()...))) : CT(std::forward<Args>(args)...)
     {}
 
     template <typename Arg>
diff --git a/include/stdplus/str/buf.hpp b/include/stdplus/str/buf.hpp
index 7aba316..472dbb8 100644
--- a/include/stdplus/str/buf.hpp
+++ b/include/stdplus/str/buf.hpp
@@ -65,8 +65,8 @@
     static_assert(sizeof(std::declval<Store>().inl) >=
                   sizeof(std::declval<Store>().dyn));
 
-    static inline constexpr auto dyn_mask = std::size_t{1}
-                                            << ((sizeof(std::size_t) << 3) - 1);
+    static inline constexpr auto dyn_mask =
+        std::size_t{1} << ((sizeof(std::size_t) << 3) - 1);
     static inline constexpr auto inl_mask =
         decltype(Store::Inl::len){1} << ((sizeof(Store::Inl::len) << 3) - 1);
 
diff --git a/include/stdplus/variant.hpp b/include/stdplus/variant.hpp
index 57e0897..77c812d 100644
--- a/include/stdplus/variant.hpp
+++ b/include/stdplus/variant.hpp
@@ -24,8 +24,8 @@
           typename... Vs>
 struct CanVeq<Veq, T, V, Vs...>
 {
-    static inline constexpr bool value = Veq<T, V>::value ||
-                                         CanVeq<Veq, T, Vs...>::value;
+    static inline constexpr bool value =
+        Veq<T, V>::value || CanVeq<Veq, T, Vs...>::value;
 };
 
 template <typename T1, typename T2>
@@ -78,8 +78,8 @@
 {
     return std::visit(
         [&t](const auto& v) {
-        return Veq<std::remove_cvref_t<decltype(v)>, T>{}(v, t);
-    },
+            return Veq<std::remove_cvref_t<decltype(v)>, T>{}(v, t);
+        },
         vs);
 }
 
@@ -93,15 +93,15 @@
 }
 
 template <typename... Vs>
-constexpr bool variantEqFuzzy(const std::variant<Vs...>& vs,
-                              const auto& t) noexcept
+constexpr bool
+    variantEqFuzzy(const std::variant<Vs...>& vs, const auto& t) noexcept
 {
     return variantEq<detail::VeqFuzzy>(vs, t);
 }
 
 template <typename... Vs>
-constexpr bool variantEqStrict(const std::variant<Vs...>& vs,
-                               const auto& t) noexcept
+constexpr bool
+    variantEqStrict(const std::variant<Vs...>& vs, const auto& t) noexcept
 {
     return variantEq<detail::VeqStrict>(vs, t);
 }
diff --git a/include/stdplus/zstring.hpp b/include/stdplus/zstring.hpp
index a7cd8c6..101cd3b 100644
--- a/include/stdplus/zstring.hpp
+++ b/include/stdplus/zstring.hpp
@@ -38,8 +38,8 @@
 
 #ifndef NDEBUG
 template <typename CharT>
-constexpr std::size_t zstring_validate(const CharT* str, std::size_t min,
-                                       std::size_t max)
+constexpr std::size_t
+    zstring_validate(const CharT* str, std::size_t min, std::size_t max)
 {
     auto ret = zstring_find_term(str, min, max);
     if (ret < 0)
@@ -88,8 +88,7 @@
 #ifdef NDEBUG
         noexcept
 #endif
-        :
-        data_(str)
+        : data_(str)
     {
 #ifndef NDEBUG
         detail::zstring_validate(str, 0, N);
@@ -106,8 +105,7 @@
 #ifdef NDEBUG
         noexcept
 #endif
-        :
-        data_(str.data())
+        : data_(str.data())
     {
 #ifndef NDEBUG
         detail::zstring_validate(str.data(), str.size(), str.size() + 1);
diff --git a/include/stdplus/zstring_view.hpp b/include/stdplus/zstring_view.hpp
index 490e5e0..4be31c3 100644
--- a/include/stdplus/zstring_view.hpp
+++ b/include/stdplus/zstring_view.hpp
@@ -80,11 +80,9 @@
     template <typename T, size_type N>
     constexpr basic_zstring_view(T (&str)[N])
 #ifdef NDEBUG
-        noexcept :
-        sv(str)
+        noexcept : sv(str)
 #else
-        :
-        sv(str, detail::zstring_validate(str, 0, N))
+        : sv(str, detail::zstring_validate(str, 0, N))
 #endif
     {}
     template <typename T, std::enable_if_t<std::is_pointer_v<T>, bool> = true>
@@ -95,8 +93,7 @@
                                bool> = true>
     constexpr basic_zstring_view(const T& str)
 #ifdef NDEBUG
-        noexcept :
-        sv(str)
+        noexcept : sv(str)
 #else
         :
         sv(str.data(),
@@ -323,8 +320,8 @@
 consteval auto cexprToZsv()
 {
     constexpr auto& d = cexprStrArr<f, /*nul=*/true>;
-    static_assert(detail::zstring_find_term(d.data(), d.size() - 1, d.size()) >=
-                  0);
+    static_assert(
+        detail::zstring_find_term(d.data(), d.size() - 1, d.size()) >= 0);
     return detail::unsafe_zstring_view(
         std::basic_string_view(d.begin(), d.end() - 1));
 }
diff --git a/src/fd/atomic.cpp b/src/fd/atomic.cpp
index 5299789..6b7530c 100644
--- a/src/fd/atomic.cpp
+++ b/src/fd/atomic.cpp
@@ -37,8 +37,7 @@
 
 AtomicWriter::AtomicWriter(const std::filesystem::path& filename, int mode,
                            std::string_view tmpl) :
-    filename(filename),
-    mode(mode),
+    filename(filename), mode(mode),
     tmpname(!tmpl.empty() ? std::string(tmpl) : makeTmpName(filename)),
     fd(mktemp(tmpname))
 {}
diff --git a/src/fd/impl.cpp b/src/fd/impl.cpp
index c2d5623..3147e64 100644
--- a/src/fd/impl.cpp
+++ b/src/fd/impl.cpp
@@ -46,9 +46,8 @@
                 ::recv(get(), buf.data(), buf.size(), static_cast<int>(flags)));
 }
 
-std::tuple<std::span<std::byte>, std::span<std::byte>>
-    FdImpl::recvfrom(std::span<std::byte> buf, RecvFlags flags,
-                     std::span<std::byte> sockaddr)
+std::tuple<std::span<std::byte>, std::span<std::byte>> FdImpl::recvfrom(
+    std::span<std::byte> buf, RecvFlags flags, std::span<std::byte> sockaddr)
 {
     socklen_t sockaddrsize = sockaddr.size();
     auto ret =
@@ -67,14 +66,14 @@
 std::span<const std::byte> FdImpl::send(std::span<const std::byte> data,
                                         SendFlags flags)
 {
-    return fret(
-        data, "send",
-        ::send(get(), data.data(), data.size(), static_cast<int>(flags)));
+    return fret(data, "send",
+                ::send(get(), data.data(), data.size(),
+                       static_cast<int>(flags)));
 }
 
-std::span<const std::byte> FdImpl::sendto(std::span<const std::byte> data,
-                                          SendFlags flags,
-                                          std::span<const std::byte> sockaddr)
+std::span<const std::byte>
+    FdImpl::sendto(std::span<const std::byte> data, SendFlags flags,
+                   std::span<const std::byte> sockaddr)
 {
     return fret(
         data, "sendto",
diff --git a/src/fd/mmap.cpp b/src/fd/mmap.cpp
index 1f5c211..7026aa6 100644
--- a/src/fd/mmap.cpp
+++ b/src/fd/mmap.cpp
@@ -7,8 +7,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)
+           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 ca549f7..c069a5a 100644
--- a/src/fd/ops.cpp
+++ b/src/fd/ops.cpp
@@ -20,8 +20,8 @@
     {
         while (total < data.size())
         {
-            auto r = (fd.*fun)(data.subspan(total),
-                               std::forward<Args>(args)...);
+            auto r =
+                (fd.*fun)(data.subspan(total), std::forward<Args>(args)...);
             if (r.size() == 0)
             {
                 throw exception::WouldBlock(
@@ -76,17 +76,17 @@
 }
 
 template <typename Fun, typename Byte, typename... Args>
-static std::span<Byte> opAligned(const char* name, Fun&& fun, Fd& fd,
-                                 size_t align, std::span<Byte> data,
-                                 Args&&... args)
+static std::span<Byte>
+    opAligned(const char* name, Fun&& fun, Fd& fd, size_t align,
+              std::span<Byte> data, Args&&... args)
 {
     std::size_t total = 0;
     try
     {
         do
         {
-            auto r = (fd.*fun)(data.subspan(total),
-                               std::forward<Args>(args)...);
+            auto r =
+                (fd.*fun)(data.subspan(total), std::forward<Args>(args)...);
             if (total != 0 && r.size() == 0)
             {
                 throw exception::Incomplete(
@@ -124,9 +124,8 @@
     return opAligned("writeAligned", &Fd::write, fd, align, data);
 }
 
-std::span<const std::byte> sendAligned(Fd& fd, size_t align,
-                                       std::span<const std::byte> data,
-                                       SendFlags flags)
+std::span<const std::byte> sendAligned(
+    Fd& fd, size_t align, std::span<const std::byte> data, SendFlags flags)
 {
     return opAligned("sendAligned", &Fd::send, fd, align, data, flags);
 }
diff --git a/test/exception.cpp b/test/exception.cpp
index a0d2e54..48e562e 100644
--- a/test/exception.cpp
+++ b/test/exception.cpp
@@ -16,8 +16,9 @@
     auto y = std::make_unique<int>(2);
     auto z = std::make_unique<int>(3);
     EXPECT_EQ(3, ignore([x = std::move(x)](auto&& v) { return *v + *x; })(y));
-    EXPECT_EQ(5, ignore([z = std::move(z)](auto v) { return *v + *z; })(
-                     std::move(y)));
+    EXPECT_EQ(5, ignore([z = std::move(z)](auto v) {
+                  return *v + *z;
+              })(std::move(y)));
 }
 
 TEST(Exception, IgnoreQuiet)
diff --git a/test/net/addr/ether.cpp b/test/net/addr/ether.cpp
index cf23223..474bd96 100644
--- a/test/net/addr/ether.cpp
+++ b/test/net/addr/ether.cpp
@@ -43,12 +43,12 @@
               tsh(EtherAddr{0x01, 0x02, 0x03, 0x04, 0x05, 0x67}));
     EXPECT_EQ("00:00:00:00:00:00",
               tsh(ether_addr{0x00, 0x00, 0x00, 0x00, 0x00, 0x00}));
-    EXPECT_EQ(
-        "a 01:02:03:04:05:67 b",
-        fmt::format("a {} b", EtherAddr{0x01, 0x02, 0x03, 0x04, 0x05, 0x67}));
-    EXPECT_EQ(
-        "a 01:02:03:04:05:67 b",
-        std::format("a {} b", EtherAddr{0x01, 0x02, 0x03, 0x04, 0x05, 0x67}));
+    EXPECT_EQ("a 01:02:03:04:05:67 b",
+              fmt::format("a {} b",
+                          EtherAddr{0x01, 0x02, 0x03, 0x04, 0x05, 0x67}));
+    EXPECT_EQ("a 01:02:03:04:05:67 b",
+              std::format("a {} b",
+                          EtherAddr{0x01, 0x02, 0x03, 0x04, 0x05, 0x67}));
 }
 
 TEST(FromStr, EtherAddr)
