diff --git a/.clang-format b/.clang-format
index d92a3f1..d43e884 100644
--- a/.clang-format
+++ b/.clang-format
@@ -14,26 +14,30 @@
 AllowShortBlocksOnASingleLine: Empty
 AllowShortCaseLabelsOnASingleLine: false
 AllowShortFunctionsOnASingleLine: Empty
-AllowShortIfStatementsOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLambdasOnASingleLine: true
 AllowShortLoopsOnASingleLine: false
 AlwaysBreakAfterReturnType: None
 AlwaysBreakBeforeMultilineStrings: false
 AlwaysBreakTemplateDeclarations: Yes
 BinPackArguments: true
 BinPackParameters: true
+BitFieldColonSpacing: None
 BraceWrapping:
   AfterCaseLabel:  true
   AfterClass:      true
   AfterControlStatement: true
   AfterEnum:       true
+  AfterExternBlock: true
   AfterFunction:   true
   AfterNamespace:  true
   AfterObjCDeclaration: true
   AfterStruct:     true
   AfterUnion:      true
-  AfterExternBlock: true
   BeforeCatch:     true
   BeforeElse:      true
+  BeforeLambdaBody: false
+  BeforeWhile:     false
   IndentBraces:    false
   SplitEmptyFunction:   false
   SplitEmptyRecord:     false
@@ -48,17 +52,16 @@
 ColumnLimit:     80
 CommentPragmas:  '^ IWYU pragma:'
 CompactNamespaces: false
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
 ConstructorInitializerIndentWidth: 4
 ContinuationIndentWidth: 4
 Cpp11BracedListStyle: true
-DeriveLineEnding: false
 DerivePointerAlignment: false
-PointerAlignment: Left
 DisableFormat:   false
-ExperimentalAutoDetectBinPacking: false
 FixNamespaceComments: true
-ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
+ForEachMacros:
+  - foreach
+  - Q_FOREACH
+  - BOOST_FOREACH
 IncludeBlocks: Regroup
 IncludeCategories:
   - Regex:           '^[<"](gtest|gmock)'
@@ -78,6 +81,7 @@
   - Regex:           '.*'
     Priority:        6
 IndentCaseLabels: true
+IndentExternBlock: NoIndent
 IndentRequiresClause: true
 IndentWidth:     4
 IndentWrappedFunctionNames: true
@@ -92,6 +96,7 @@
 ObjCBlockIndentWidth: 2
 ObjCSpaceAfterProperty: false
 ObjCSpaceBeforeProtocolList: true
+PackConstructorInitializers: BinPack
 PenaltyBreakAssignment: 25
 PenaltyBreakBeforeFirstCallParameter: 19
 PenaltyBreakComment: 300
@@ -100,12 +105,13 @@
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
 PenaltyIndentedWhitespace: 0
+PointerAlignment: Left
 QualifierAlignment: Left
 ReferenceAlignment: Left
 ReflowComments:  true
 RequiresClausePosition: OwnLine
 RequiresExpressionIndentation: Keyword
-SortIncludes:    true
+SortIncludes: CaseSensitive
 SortUsingDeclarations: true
 SpaceAfterCStyleCast: false
 SpaceAfterTemplateKeyword: true
@@ -117,7 +123,7 @@
 SpaceBeforeRangeBasedForLoopColon: true
 SpaceInEmptyParentheses: false
 SpacesBeforeTrailingComments: 1
-SpacesInAngles:  false
+SpacesInAngles: Never
 SpacesInContainerLiterals: true
 SpacesInCStyleCastParentheses: false
 SpacesInParentheses: false
diff --git a/example/asio-example.cpp b/example/asio-example.cpp
index 8138dea..474d261 100644
--- a/example/asio-example.cpp
+++ b/example/asio-example.cpp
@@ -230,7 +230,7 @@
         [](const std::string& req, std::string& propertyValue) {
         propertyValue = req;
         return true;
-        },
+    },
         // custom get
         [](const std::string& property) {
         auto now = std::chrono::system_clock::now();
@@ -334,7 +334,7 @@
         {
             std::cout << item.first << "\n";
         }
-        },
+    },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
         "xyz.openbmc_project.ObjectMapper", "GetSubTree",
@@ -355,7 +355,7 @@
         {
             std::cerr << "async_method_call should have failed!\n";
         }
-        },
+    },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
         "xyz.openbmc_project.ObjectMapper", "GetSubTree",
@@ -391,7 +391,7 @@
             return;
         }
         std::cout << "TestYieldFunction return " << testValue << "\n";
-        },
+    },
         "xyz.openbmc_project.asio-test", "/xyz/openbmc_project/test",
         "xyz.openbmc_project.test", "TestYieldFunction", int32_t(41));
     io.run();
diff --git a/example/coroutine-example.cpp b/example/coroutine-example.cpp
index c077acd..2302f47 100644
--- a/example/coroutine-example.cpp
+++ b/example/coroutine-example.cpp
@@ -50,9 +50,9 @@
             {
                 return std::to_string(v);
             }
-                         },
+        },
                          value)
-            << std::endl;
+                  << std::endl;
     }
 
     // Try to set the Architecture property (which won't work).
diff --git a/example/get-all-properties.cpp b/example/get-all-properties.cpp
index 711dd8b..35e9783 100644
--- a/example/get-all-properties.cpp
+++ b/example/get-all-properties.cpp
@@ -35,7 +35,7 @@
             [this](const auto& newPropertyValue, const auto&) {
             goodbyes_ = newPropertyValue;
             return true;
-            },
+        },
             [this](const auto&) { return goodbyes_; });
 
         demo_->register_property_r<uint32_t>(
@@ -84,49 +84,48 @@
                    const std::vector<std::pair<
                        std::string, std::variant<std::monostate, std::string>>>&
                        properties) -> void {
-                if (ec)
-                {
-                    logSystemErrorCode(ec);
-                    return;
-                }
-                {
-                    const std::string* greetings = nullptr;
-                    const std::string* goodbyes = nullptr;
-                    const bool success = sdbusplus::unpackPropertiesNoThrow(
-                        [this](const sdbusplus::UnpackErrorReason reason,
-                               const std::string& property) {
+            if (ec)
+            {
+                logSystemErrorCode(ec);
+                return;
+            }
+            {
+                const std::string* greetings = nullptr;
+                const std::string* goodbyes = nullptr;
+                const bool success = sdbusplus::unpackPropertiesNoThrow(
+                    [this](const sdbusplus::UnpackErrorReason reason,
+                           const std::string& property) {
                     logUnpackError(reason, property);
-                        },
-                        properties, propertyGrettingName, greetings,
-                        propertyGoodbyesName, goodbyes);
+                },
+                    properties, propertyGrettingName, greetings,
+                    propertyGoodbyesName, goodbyes);
 
-                    if (success)
-                    {
-                        std::cout << "value of greetings: " << *greetings
-                                  << "\n";
-                        std::cout << "value of goodbyes: " << *goodbyes << "\n";
-                    }
-                    else
-                    {
-                        ++fatalErrors_;
-                    }
-                }
-
-                try
+                if (success)
                 {
-                    std::string value;
-                    sdbusplus::unpackProperties(properties, propertyValueName,
-                                                value);
-
-                    std::cerr << "Error: it should fail because of "
-                                 "not matched type\n";
+                    std::cout << "value of greetings: " << *greetings << "\n";
+                    std::cout << "value of goodbyes: " << *goodbyes << "\n";
+                }
+                else
+                {
                     ++fatalErrors_;
                 }
-                catch (const sdbusplus::exception::UnpackPropertyError& error)
-                {
-                    logExpectedException(error);
-                }
-            });
+            }
+
+            try
+            {
+                std::string value;
+                sdbusplus::unpackProperties(properties, propertyValueName,
+                                            value);
+
+                std::cerr << "Error: it should fail because of "
+                             "not matched type\n";
+                ++fatalErrors_;
+            }
+            catch (const sdbusplus::exception::UnpackPropertyError& error)
+            {
+                logExpectedException(error);
+            }
+        });
     }
 
     void asyncGetAllProperties()
@@ -138,60 +137,59 @@
                        std::string,
                        std::variant<std::monostate, std::string, uint32_t>>>&
                        properties) -> void {
-                if (ec)
-                {
-                    logSystemErrorCode(ec);
-                    return;
-                }
-                try
-                {
-                    std::string greetings;
-                    std::string goodbyes;
-                    uint32_t value = 0u;
-                    sdbusplus::unpackProperties(properties,
-                                                propertyGrettingName, greetings,
-                                                propertyGoodbyesName, goodbyes,
-                                                propertyValueName, value);
+            if (ec)
+            {
+                logSystemErrorCode(ec);
+                return;
+            }
+            try
+            {
+                std::string greetings;
+                std::string goodbyes;
+                uint32_t value = 0u;
+                sdbusplus::unpackProperties(properties, propertyGrettingName,
+                                            greetings, propertyGoodbyesName,
+                                            goodbyes, propertyValueName, value);
 
-                    std::cout << "value of greetings: " << greetings << "\n";
-                    std::cout << "value of goodbyes: " << goodbyes << "\n";
-                    std::cout << "value of value: " << value << "\n";
-                }
-                catch (const sdbusplus::exception::UnpackPropertyError& error)
-                {
-                    logException(error);
-                }
+                std::cout << "value of greetings: " << greetings << "\n";
+                std::cout << "value of goodbyes: " << goodbyes << "\n";
+                std::cout << "value of value: " << value << "\n";
+            }
+            catch (const sdbusplus::exception::UnpackPropertyError& error)
+            {
+                logException(error);
+            }
 
-                try
-                {
-                    std::string unknownProperty;
-                    sdbusplus::unpackProperties(
-                        properties, "UnknownPropertyName", unknownProperty);
+            try
+            {
+                std::string unknownProperty;
+                sdbusplus::unpackProperties(properties, "UnknownPropertyName",
+                                            unknownProperty);
 
-                    std::cerr << "Error: it should fail because of "
-                                 "missing property\n";
-                    ++fatalErrors_;
-                }
-                catch (const sdbusplus::exception::UnpackPropertyError& error)
-                {
-                    logExpectedException(error);
-                }
+                std::cerr << "Error: it should fail because of "
+                             "missing property\n";
+                ++fatalErrors_;
+            }
+            catch (const sdbusplus::exception::UnpackPropertyError& error)
+            {
+                logExpectedException(error);
+            }
 
-                try
-                {
-                    uint32_t notMatchingType;
-                    sdbusplus::unpackProperties(
-                        properties, propertyGrettingName, notMatchingType);
+            try
+            {
+                uint32_t notMatchingType;
+                sdbusplus::unpackProperties(properties, propertyGrettingName,
+                                            notMatchingType);
 
-                    std::cerr << "Error: it should fail because of "
-                                 "not matched type\n";
-                    ++fatalErrors_;
-                }
-                catch (const sdbusplus::exception::UnpackPropertyError& error)
-                {
-                    logExpectedException(error);
-                }
-            });
+                std::cerr << "Error: it should fail because of "
+                             "not matched type\n";
+                ++fatalErrors_;
+            }
+            catch (const sdbusplus::exception::UnpackPropertyError& error)
+            {
+                logExpectedException(error);
+            }
+        });
     }
 
   private:
diff --git a/example/register-property.cpp b/example/register-property.cpp
index c22231a..e10b0f1 100644
--- a/example/register-property.cpp
+++ b/example/register-property.cpp
@@ -34,9 +34,9 @@
                 [this](const auto& newPropertyValue, const auto&) {
                 goodbyes_ = newPropertyValue;
                 return true;
-                },
+            },
                 [this](const auto&) { return goodbyes_; });
-            });
+        });
     }
 
     uint32_t fatalErrors() const
@@ -69,7 +69,7 @@
             std::cerr << "Error: it was expected to fail getProperty due "
                          "to wrong type\n";
             ++fatalErrors_;
-            });
+        });
     }
 
     void asyncReadProperties()
@@ -84,7 +84,7 @@
                 return;
             }
             std::cout << "Greetings value is: " << value << "\n";
-            });
+        });
 
         sdbusplus::asio::getProperty<std::string>(
             bus_, demoServiceName, demoObjectPath, demoInterfaceName,
@@ -96,7 +96,7 @@
                 return;
             }
             std::cout << "Goodbyes value is: " << value << "\n";
-            });
+        });
     }
 
     void asyncChangeProperty()
@@ -114,7 +114,7 @@
 
             std::cout << "Error: it was expected to fail to change greetings\n";
             ++fatalErrors_;
-            });
+        });
 
         sdbusplus::asio::setProperty(
             bus_, demoServiceName, demoObjectPath, demoInterfaceName,
@@ -130,7 +130,7 @@
             }
             std::cout << "Changed goodbyes property as expected\n";
             boost::asio::post(ioc_, [this] { asyncReadProperties(); });
-            });
+        });
     }
 
     void syncChangeGoodbyes(std::string_view value)
diff --git a/include/sdbusplus/asio/connection.hpp b/include/sdbusplus/asio/connection.hpp
index eed2827..62514ab 100644
--- a/include/sdbusplus/asio/connection.hpp
+++ b/include/sdbusplus/asio/connection.hpp
@@ -133,9 +133,9 @@
         }();
         using UnpackType = utility::strip_first_n_args_t<returnWithMsg ? 2 : 1,
                                                          FunctionTupleType>;
-        auto applyHandler =
-            [handler = std::forward<MessageHandler>(handler)](
-                boost::system::error_code ec, message_t& r) mutable {
+        auto applyHandler = [handler = std::forward<MessageHandler>(handler)](
+                                boost::system::error_code ec,
+                                message_t& r) mutable {
             UnpackType responseData;
             if (!ec)
             {
@@ -332,7 +332,7 @@
             {
                 read_wait();
             }
-            });
+        });
     }
     void read_immediate()
     {
diff --git a/include/sdbusplus/asio/property.hpp b/include/sdbusplus/asio/property.hpp
index 28e99c4..f5eebb9 100644
--- a/include/sdbusplus/asio/property.hpp
+++ b/include/sdbusplus/asio/property.hpp
@@ -67,7 +67,7 @@
         handler(boost::system::errc::make_error_code(
                     boost::system::errc::invalid_argument),
                 {});
-        },
+    },
         service, path, "org.freedesktop.DBus.Properties", "Get", interface,
         propertyName);
 }
@@ -100,7 +100,7 @@
 
         onError(boost::system::errc::make_error_code(
             boost::system::errc::invalid_argument));
-        },
+    },
         service, path, "org.freedesktop.DBus.Properties", "Get", interface,
         propertyName);
 }
diff --git a/include/sdbusplus/async/proxy.hpp b/include/sdbusplus/async/proxy.hpp
index 4e00005..3bcb55c 100644
--- a/include/sdbusplus/async/proxy.hpp
+++ b/include/sdbusplus/async/proxy.hpp
@@ -133,9 +133,8 @@
 
         // Use 'callback' to perform the operation and "then" "unpack" the
         // contents.
-        return callback(
-                   [bus = get_busp(ctx),
-                    msg = std::move(msg)](auto cb, auto data) mutable {
+        return callback([bus = get_busp(ctx),
+                         msg = std::move(msg)](auto cb, auto data) mutable {
             return sd_bus_call_async(bus, nullptr, msg.get(), cb, data, 0);
         }) | execution::then([](message_t&& m) { return m.unpack<Rs...>(); });
     }
diff --git a/include/sdbusplus/async/stdexec/any_sender_of.hpp b/include/sdbusplus/async/stdexec/any_sender_of.hpp
index fdadae7..391cd86 100644
--- a/include/sdbusplus/async/stdexec/any_sender_of.hpp
+++ b/include/sdbusplus/async/stdexec/any_sender_of.hpp
@@ -916,11 +916,11 @@
     {
         static __operation_vtable __vtable{
             [](void* __object_pointer) noexcept -> void {
-                STDEXEC_ASSERT(__object_pointer);
-                _Op& __op = *static_cast<_Op*>(__object_pointer);
-                static_assert(operation_state<_Op>);
-                start(__op);
-            }};
+            STDEXEC_ASSERT(__object_pointer);
+            _Op& __op = *static_cast<_Op*>(__object_pointer);
+            static_assert(operation_state<_Op>);
+            start(__op);
+        }};
         return &__vtable;
     }
 };
@@ -1123,17 +1123,15 @@
                                   __mtype<_Sender>{})},
                 [](void* __object_pointer, __receiver_ref_t __receiver)
                     -> __immovable_operation_storage {
-                    _Sender& __sender =
-                        *static_cast<_Sender*>(__object_pointer);
-                    using __op_state_t =
-                        connect_result_t<_Sender, __receiver_ref_t>;
-                    return __immovable_operation_storage{
-                        std::in_place_type<__op_state_t>, __conv{[&] {
-                            return stdexec::connect(
-                                (_Sender&&)__sender,
-                                (__receiver_ref_t&&)__receiver);
-                        }}};
-                }};
+                _Sender& __sender = *static_cast<_Sender*>(__object_pointer);
+                using __op_state_t =
+                    connect_result_t<_Sender, __receiver_ref_t>;
+                return __immovable_operation_storage{
+                    std::in_place_type<__op_state_t>, __conv{[&] {
+                    return stdexec::connect((_Sender&&)__sender,
+                                            (__receiver_ref_t&&)__receiver);
+                }}};
+            }};
             return &__vtable_;
         }
     };
@@ -1246,20 +1244,20 @@
                 {*__create_vtable(__mtype<__query_vtable<_SchedulerQueries>>{},
                                   __mtype<_Scheduler>{})},
                 [](void* __object_pointer) noexcept -> __sender_t {
-                    const _Scheduler& __scheduler =
-                        *static_cast<const _Scheduler*>(__object_pointer);
-                    return __sender_t{schedule(__scheduler)};
-                },
+                const _Scheduler& __scheduler =
+                    *static_cast<const _Scheduler*>(__object_pointer);
+                return __sender_t{schedule(__scheduler)};
+            },
                 [](const void* __self, const void* __other) noexcept -> bool {
-                    static_assert(noexcept(__declval<const _Scheduler&>() ==
-                                           __declval<const _Scheduler&>()));
-                    STDEXEC_ASSERT(__self && __other);
-                    const _Scheduler& __self_scheduler =
-                        *static_cast<const _Scheduler*>(__self);
-                    const _Scheduler& __other_scheduler =
-                        *static_cast<const _Scheduler*>(__other);
-                    return __self_scheduler == __other_scheduler;
-                }};
+                static_assert(noexcept(__declval<const _Scheduler&>() ==
+                                       __declval<const _Scheduler&>()));
+                STDEXEC_ASSERT(__self && __other);
+                const _Scheduler& __self_scheduler =
+                    *static_cast<const _Scheduler*>(__self);
+                const _Scheduler& __other_scheduler =
+                    *static_cast<const _Scheduler*>(__other);
+                return __self_scheduler == __other_scheduler;
+            }};
             return &__vtable_;
         }
     };
diff --git a/include/sdbusplus/async/stdexec/async_scope.hpp b/include/sdbusplus/async/stdexec/async_scope.hpp
index 12a19db..d806fc1 100644
--- a/include/sdbusplus/async/stdexec/async_scope.hpp
+++ b/include/sdbusplus/async/stdexec/async_scope.hpp
@@ -356,10 +356,10 @@
                             __guard.unlock();
                             tag((_Receiver&&)__rcvr_, (_As&&)__as...);
                             __guard.lock();
-                            },
+                        },
                             __tup);
                     }
-                    },
+                },
                     __state->__data_);
             }
         }
@@ -422,8 +422,8 @@
         std::unique_ptr<__future_state<_Sender, _Env>> __state) :
         __subscription{{},
                        [](__subscription* __self) noexcept -> void {
-                           static_cast<__future_op*>(__self)->__complete_();
-                       }},
+        static_cast<__future_op*>(__self)->__complete_();
+    }},
         __rcvr_((_Receiver2&&)__rcvr), __state_(std::move(__state)),
         __forward_consumer_(get_stop_token(get_env(__rcvr_)),
                             __forward_stopped{&__state_->__stop_source_})
@@ -752,9 +752,9 @@
                      with(get_stop_token, __scope->__stop_source_.get_token())),
             [](__spawn_op_base<_EnvId>* __op) {
         delete static_cast<__spawn_op*>(__op);
-            }},
-    __op_(stdexec::connect((_Sndr&&)__sndr,
-                           __spawn_receiver_t<_Env>{this, __scope}))
+    }},
+        __op_(stdexec::connect((_Sndr&&)__sndr,
+                               __spawn_receiver_t<_Env>{this, __scope}))
     {}
 
     void __start_() noexcept
diff --git a/include/sdbusplus/async/stdexec/execution.hpp b/include/sdbusplus/async/stdexec/execution.hpp
index 981de5d..1a81553 100644
--- a/include/sdbusplus/async/stdexec/execution.hpp
+++ b/include/sdbusplus/async/stdexec/execution.hpp
@@ -559,7 +559,7 @@
     // P2300R7.
     template <class _EnvProvider>
     constexpr decltype(auto)
-        operator()(const _EnvProvider& __with_env) const noexcept
+        operator()(const _EnvProvider & __with_env) const noexcept
     {
         if constexpr (!enable_sender<_EnvProvider>)
         {
@@ -1659,7 +1659,9 @@
 concept tag_category = //
     requires {
         typename __mbool<bool{_Predicate(_Tag{})}>;
-        requires bool{_Predicate(_Tag{})};
+        requires bool {
+            _Predicate(_Tag{})
+        };
     };
 
 /////////////////////////////////////////////////////////////////////////////
@@ -2497,8 +2499,8 @@
             (_CvrefReceiver&&)__rcvr,
             [](__operation_base<_ReceiverId>* __self) noexcept {
         delete static_cast<__operation*>(__self);
-            }},
-    __op_state_(connect((_Sender&&)__sndr, __receiver_t<_ReceiverId>{this}))
+    }},
+        __op_state_(connect((_Sender&&)__sndr, __receiver_t<_ReceiverId>{this}))
     {}
 };
 
@@ -2679,7 +2681,7 @@
             std::apply(
                 [&__op_state](_Ts&... __ts) {
                 _Tag{}((_Receiver&&)__op_state.__rcvr_, (_Ts&&)__ts...);
-                },
+            },
                 __op_state.__vals_);
         }
     };
@@ -2939,7 +2941,7 @@
         return std::apply(
             [&__sndr, this](_As&... __as) {
             return ((_Fun&&)__fun_)((_Sender&&)__sndr, (_As&&)__as...);
-            },
+        },
             __as_);
     }
 
@@ -2953,7 +2955,7 @@
         return std::apply(
             [&__sndr, this](const _As&... __as) {
             return __fun_((_Sender&&)__sndr, __as...);
-            },
+        },
             __as_);
     }
 };
@@ -3124,9 +3126,10 @@
 
         template <same_as<set_value_t> _SetValue, class _Dp = _Derived,
                   class... _As>
-            requires _MISSING_MEMBER(_Dp, set_value) &&
-                     tag_invocable<_SetValue, __base_t<_Dp>, _As...>
-        STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
+            requires _MISSING_MEMBER
+        (_Dp, set_value) &&
+            tag_invocable<_SetValue, __base_t<_Dp>,
+                          _As...> STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
             friend void tag_invoke(_SetValue, _Derived&& __self,
                                    _As&&... __as) noexcept
         {
@@ -3149,9 +3152,10 @@
 
         template <same_as<set_error_t> _SetError, class _Error,
                   class _Dp = _Derived>
-            requires _MISSING_MEMBER(_Dp, set_error) &&
-                     tag_invocable<_SetError, __base_t<_Dp>, _Error>
-        STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
+            requires _MISSING_MEMBER
+        (_Dp, set_error) &&
+            tag_invocable<_SetError, __base_t<_Dp>,
+                          _Error> STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
             friend void tag_invoke(_SetError, _Derived&& __self,
                                    _Error&& __err) noexcept
         {
@@ -3172,9 +3176,10 @@
         }
 
         template <same_as<set_stopped_t> _SetStopped, class _Dp = _Derived>
-            requires _MISSING_MEMBER(_Dp, set_stopped) &&
-                     tag_invocable<_SetStopped, __base_t<_Dp>>
-        STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
+            requires _MISSING_MEMBER
+        (_Dp, set_stopped) &&
+            tag_invocable<_SetStopped,
+                          __base_t<_Dp>> STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
             friend void tag_invoke(_SetStopped, _Derived&& __self) noexcept
         {
             stdexec::set_stopped(__get_base((_Derived&&)__self));
@@ -3192,8 +3197,8 @@
         }
 
         template <same_as<get_env_t> _GetEnv, class _Dp = _Derived>
-            requires _MISSING_MEMBER(_Dp, get_env)
-        STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
+            requires _MISSING_MEMBER
+        (_Dp, get_env) STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
             friend auto tag_invoke(_GetEnv, const _Derived& __self) noexcept
             -> env_of_t<__base_t<const _Dp&>>
         {
@@ -3356,8 +3361,8 @@
 
         __t(_Sender&& __sndr, _Receiver __rcvr, _Fun __fun) //
             noexcept(__nothrow_decay_copyable<_Receiver>    //
-                         && __nothrow_decay_copyable<_Fun>  //
-                             && __nothrow_connectable<_Sender, __receiver_t>) :
+                     && __nothrow_decay_copyable<_Fun>      //
+                     && __nothrow_connectable<_Sender, __receiver_t>) :
             __data_{(_Receiver&&)__rcvr, (_Fun&&)__fun},
             __op_(connect((_Sender&&)__sndr, __receiver_t{&__data_}))
         {}
@@ -4158,13 +4163,12 @@
 
             std::visit(
                 [&](const auto& __tupl) noexcept -> void {
-                    std::apply(
-                        [&](auto __tag,
-                            const auto&... __args) noexcept -> void {
-                            __tag((_Receiver&&)__op->__rcvr_, __args...);
-                        },
-                        __tupl);
+                std::apply(
+                    [&](auto __tag, const auto&... __args) noexcept -> void {
+                    __tag((_Receiver&&)__op->__rcvr_, __args...);
                 },
+                    __tupl);
+            },
                 __op->__shared_state_->__data_);
         }
 
@@ -4529,13 +4533,12 @@
 
             std::visit(
                 [&](auto& __tupl) noexcept -> void {
-                    std::apply(
-                        [&](auto __tag, auto&... __args) noexcept -> void {
-                            __tag((_Receiver&&)__op->__rcvr_,
-                                  std::move(__args)...);
-                        },
-                        __tupl);
+                std::apply(
+                    [&](auto __tag, auto&... __args) noexcept -> void {
+                    __tag((_Receiver&&)__op->__rcvr_, std::move(__args)...);
                 },
+                    __tupl);
+            },
                 __op->__shared_state_->__data_);
         }
 
@@ -4835,13 +4838,12 @@
                     __self.__op_state_->__args_.template emplace<__tuple_t>(
                         (_As&&)__as...);
                 auto& __op = __self.__op_state_->__op_state3_
-                                 .template emplace<__op_state_t>(__conv{
-                                     [&] {
+                                 .template emplace<__op_state_t>(__conv{[&] {
                     return connect(
                         std::apply(std::move(__self.__op_state_->__fun_),
                                    __args),
                         std::move(__self.__op_state_->__rcvr_));
-                                 }});
+                }});
                 start(__op);
             }
             catch (...)
@@ -5198,7 +5200,7 @@
                    [__err2 = (_Error&&)__err]() mutable //
                    noexcept(std::is_nothrow_move_constructible_v<_Error>) {
             return just_error((_Error&&)__err2);
-               });
+        });
     }
 
     template <__movable_value _Error>
@@ -5639,21 +5641,21 @@
             STDEXEC_ASSERT(!__data_.valueless_by_exception());
             std::visit(
                 [&]<class _Tup>(_Tup& __tupl) -> void {
-                    if constexpr (same_as<_Tup, std::monostate>)
-                    {
-                        std::terminate(); // reaching this indicates a bug in
-                                          // schedule_from
-                    }
-                    else
-                    {
-                        std::apply(
-                            [&]<class... _Args>(auto __tag,
-                                                _Args&... __args) -> void {
-                                __tag((_Receiver&&)__rcvr_, (_Args&&)__args...);
-                            },
-                            __tupl);
-                    }
-                },
+                if constexpr (same_as<_Tup, std::monostate>)
+                {
+                    std::terminate(); // reaching this indicates a bug in
+                                      // schedule_from
+                }
+                else
+                {
+                    std::apply(
+                        [&]<class... _Args>(auto __tag,
+                                            _Args&... __args) -> void {
+                        __tag((_Receiver&&)__rcvr_, (_Args&&)__args...);
+                    },
+                        __tupl);
+                }
+            },
                 __data_);
         }
     };
@@ -5916,9 +5918,9 @@
                 // This line will invalidate *this:
                 start(__op_state->__data_.template emplace<1>(
                     __conv{[__op_state] {
-                        return connect((_Sender&&)__op_state->__sndr_,
-                                       __receiver_ref_t{{}, __op_state});
-                    }}));
+                    return connect((_Sender&&)__op_state->__sndr_,
+                                   __receiver_ref_t{{}, __op_state});
+                }}));
             }
             catch (...)
             {
@@ -5953,10 +5955,9 @@
         __t(_Scheduler __sched, _Sender2&& __sndr, _Receiver2&& __rcvr) :
             __scheduler_((_Scheduler&&)__sched), __sndr_((_Sender2&&)__sndr),
             __rcvr_((_Receiver2&&)__rcvr),
-            __data_{std::in_place_index<0>, __conv{
-                                                [this] {
+            __data_{std::in_place_index<0>, __conv{[this] {
             return connect(schedule(__scheduler_), __receiver_t{{}, this});
-                    }}}
+        }}}
         {}
 
         STDEXEC_IMMOVABLE(__t);
@@ -6256,8 +6257,8 @@
 auto __make_env(_Env&& __env, in_place_stop_source& __stop_source) noexcept
 {
     return __env::__join_env(__env::__env_fn{[&](get_stop_token_t) noexcept {
-                                 return __stop_source.get_token();
-                             }},
+        return __stop_source.get_token();
+    }},
                              (_Env&&)__env);
 }
 
@@ -6355,9 +6356,9 @@
 {
     std::apply(
         [&](auto&... __opt_vals) noexcept -> void {
-            std::apply(__complete_fn{set_value, __rcvr},
-                       std::tuple_cat(std::apply(__tie_fn{}, *__opt_vals)...));
-        },
+        std::apply(__complete_fn{set_value, __rcvr},
+                   std::tuple_cat(std::apply(__tie_fn{}, *__opt_vals)...));
+    },
         __values);
 }
 
@@ -6632,9 +6633,9 @@
             std::index_sequence<_Is...>) :
             __operation_base_t{{}, (_Receiver&&)__rcvr, {sizeof...(_Is)}},
             __op_states_{__conv{[&__sndrs, this]() {
-                return stdexec::connect(std::get<_Is>((_SendersTuple&&)__sndrs),
-                                        __receiver_t<_Is>{this});
-            }}...}
+            return stdexec::connect(std::get<_Is>((_SendersTuple&&)__sndrs),
+                                    __receiver_t<_Is>{this});
+        }}...}
         {}
 
         template <class _SendersTuple>
@@ -6658,8 +6659,8 @@
             {
                 std::apply(
                     [](auto&... __child_ops) noexcept -> void {
-                        (stdexec::start(__child_ops), ...);
-                    },
+                    (stdexec::start(__child_ops), ...);
+                },
                     __self.__op_states_);
                 if constexpr (sizeof...(_SenderIds) == 0)
                 {
diff --git a/include/sdbusplus/async/stdexec/task.hpp b/include/sdbusplus/async/stdexec/task.hpp
index 9f0606d..c2da093 100644
--- a/include/sdbusplus/async/stdexec/task.hpp
+++ b/include/sdbusplus/async/stdexec/task.hpp
@@ -549,7 +549,7 @@
     }
 
     // Make this task generally awaitable:
-    friend __task_awaitable<> operator co_await(basic_task&& __self) noexcept
+    friend __task_awaitable<> operator co_await(basic_task && __self) noexcept
         requires __valid<awaiter_context_t, __promise>
     {
         return __task_awaitable<>{std::exchange(__self.__coro_, {})};
diff --git a/include/sdbusplus/timer.hpp b/include/sdbusplus/timer.hpp
index 2401763..c9777c6 100644
--- a/include/sdbusplus/timer.hpp
+++ b/include/sdbusplus/timer.hpp
@@ -180,7 +180,7 @@
                void* userData) {
             auto timer = static_cast<Timer*>(userData);
             return timer->timeoutHandler();
-            },     // Callback handler on timeout
+        },         // Callback handler on timeout
             this); // User data
         if (r < 0)
         {
diff --git a/include/sdbusplus/unpack_properties.hpp b/include/sdbusplus/unpack_properties.hpp
index f232130..2183ace 100644
--- a/include/sdbusplus/unpack_properties.hpp
+++ b/include/sdbusplus/unpack_properties.hpp
@@ -23,10 +23,9 @@
     const std::vector<std::pair<std::string, VariantType>>& container,
     const std::string& key) noexcept
 {
-    return std::find_if(container.begin(), container.end(),
-                        [&key](const auto& keyValue) {
-        return keyValue.first == key;
-    });
+    return std::find_if(
+        container.begin(), container.end(),
+        [&key](const auto& keyValue) { return keyValue.first == key; });
 }
 
 template <typename OnErrorCallback, typename VariantType, typename ValueType>
@@ -147,7 +146,7 @@
     details::unpackPropertiesCommon(
         [](const UnpackErrorReason reason, const std::string& property) {
         throw exception::UnpackPropertyError(property, reason);
-        },
+    },
         input, std::forward<Args>(args)...);
 }
 
diff --git a/src/async/match.cpp b/src/async/match.cpp
index 7dceba4..9ac3cd0 100644
--- a/src/async/match.cpp
+++ b/src/async/match.cpp
@@ -6,8 +6,8 @@
 slot_t match::makeMatch(context& ctx, const std::string_view& pattern)
 {
     // C-style callback to redirect into this::handle_match.
-    static auto match_cb =
-        [](message::msgp_t msg, void* ctx, sd_bus_error*) noexcept {
+    static auto match_cb = [](message::msgp_t msg, void* ctx,
+                              sd_bus_error*) noexcept {
         static_cast<match*>(ctx)->handle_match(message_t{msg});
         return 0;
     };
diff --git a/test/bus/match.cpp b/test/bus/match.cpp
index d925c7a..049e033 100644
--- a/test/bus/match.cpp
+++ b/test/bus/match.cpp
@@ -29,8 +29,8 @@
 TEST_F(Match, FunctorIs_sd_bus_message_handler_t)
 {
     bool triggered = false;
-    auto trigger =
-        [](sd_bus_message* /*m*/, void* context, sd_bus_error* /*e*/) {
+    auto trigger = [](sd_bus_message* /*m*/, void* context,
+                      sd_bus_error* /*e*/) {
         *static_cast<bool*>(context) = true;
         return 0;
     };
diff --git a/test/message/call.cpp b/test/message/call.cpp
index 69c8d43..586677f 100644
--- a/test/message/call.cpp
+++ b/test/message/call.cpp
@@ -94,7 +94,7 @@
             [&](message&&) { throw std::runtime_error("testerror"); });
         b.wait(1s);
         b.process_discard();
-        }(),
+    }(),
         "testerror");
 }
 
diff --git a/test/unpack_properties.cpp b/test/unpack_properties.cpp
index 3ed04ca..5ba9b46 100644
--- a/test/unpack_properties.cpp
+++ b/test/unpack_properties.cpp
@@ -35,7 +35,7 @@
             [&error](sdbusplus::UnpackErrorReason reason,
                      const std::string& property) {
             error.emplace(reason, property);
-            },
+        },
             std::forward<Args>(args)...);
         return error;
     }
diff --git a/test/vtable/vtable.cpp b/test/vtable/vtable.cpp
index abb27d6..092f5cf 100644
--- a/test/vtable/vtable.cpp
+++ b/test/vtable/vtable.cpp
@@ -4,17 +4,16 @@
 
 extern "C"
 {
-    int test_handler(sd_bus_message* m, void* userdata,
-                     sd_bus_error* ret_error);
-    int test_get(sd_bus* bus, const char* path, const char* interface,
-                 const char* property, sd_bus_message* reply, void* userdata,
-                 sd_bus_error* ret_error);
-    int test_set(sd_bus* bus, const char* path, const char* interface,
-                 const char* property, sd_bus_message* value, void* userdata,
-                 sd_bus_error* ret_error);
+int test_handler(sd_bus_message* m, void* userdata, sd_bus_error* ret_error);
+int test_get(sd_bus* bus, const char* path, const char* interface,
+             const char* property, sd_bus_message* reply, void* userdata,
+             sd_bus_error* ret_error);
+int test_set(sd_bus* bus, const char* path, const char* interface,
+             const char* property, sd_bus_message* value, void* userdata,
+             sd_bus_error* ret_error);
 
-    extern const sd_bus_vtable example2[];
-    extern const size_t example2_size;
+extern const sd_bus_vtable example2[];
+extern const size_t example2_size;
 }
 
 static const sdbusplus::vtable_t example[] = {
