Move to clang-format-16 (#908)

Fixes #848
This commit is contained in:
Alex Kremer
2023-10-19 16:55:04 +01:00
committed by GitHub
parent 5de87b9ef8
commit 1aab2b94b1
265 changed files with 3950 additions and 4743 deletions

View File

@@ -30,14 +30,17 @@ namespace web {
/**
* @brief Specifies the requirements a Webserver handler must fulfill.
*/
// clang-format off
template <typename T>
concept SomeServerHandler = requires(T handler, std::string req, std::shared_ptr<ConnectionBase> ws, boost::beast::error_code ec) {
// the callback when server receives a request
{ handler(req, ws) };
// the callback when there is an error
{ handler(ec, ws) };
};
// clang-format on
concept SomeServerHandler =
requires(T handler, std::string req, std::shared_ptr<ConnectionBase> ws, boost::beast::error_code ec) {
// the callback when server receives a request
{
handler(req, ws)
};
// the callback when there is an error
{
handler(ec, ws)
};
};
} // namespace web

View File

@@ -33,8 +33,7 @@ namespace http = boost::beast::http;
*
* This class is used to represent a connection in RPC executor and subscription manager.
*/
struct ConnectionBase : public util::Taggable
{
struct ConnectionBase : public util::Taggable {
protected:
boost::system::error_code ec_;
@@ -71,7 +70,8 @@ public:
* @param msg The message to send
* @throws Not supported unless implemented in child classes. Will always throw std::logic_error.
*/
virtual void send(std::shared_ptr<std::string> /* msg */)
virtual void
send(std::shared_ptr<std::string> /* msg */)
{
throw std::logic_error("web server can not send the shared payload");
}