sdbus++: async: client: fix client_t usage
When using the "Alternatively,..." syntax from calculator-client, we
end up with the compiler error:
```
example/gen/net/poettering/Calculator/client.hpp:149:40: error: ‘constexpr sdbusplus::client::net::poettering::details::Calculator<Proxy>::Calculator(sdbusplus::async::context&, Proxy) [with Proxy = sdbusplus::async::proxy_ns::proxy<true, true, false, false>]’ is private within this context
149 | std::forward<Args>(args)...)
```
Fix this by making the generated alias class a friend of the details
class, in addition to the client_t proxy. Add a compile test to ensure
this works. Fix up a few whitespace alignment to better match
clang-format expectations.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie0def6e6c96acc287c002c157d93016b4a79015c
diff --git a/example/calculator-client.cpp b/example/calculator-client.cpp
index 6bb2bc7..ab47767 100644
--- a/example/calculator-client.cpp
+++ b/example/calculator-client.cpp
@@ -14,6 +14,11 @@
// Alternatively, sdbusplus::async::client_t<Calculator, ...>() could have
// been used to combine multiple interfaces into a single client-proxy.
+ auto alternative_c [[maybe_unused]] =
+ sdbusplus::async::client_t<
+ sdbusplus::client::net::poettering::Calculator>(ctx)
+ .service(service)
+ .path(path);
{
// Call the Multiply method.