These handlerSubscription fields blocked quite useful static assertions.
They are in the way of callback improvements; that work has discovered
that they are unused (since inception in merge commit
1c8f25b).
Ipc::SharedListenRequest::SharedListenRequest(const TypedMsgHdr &hdrMsg)
{
hdrMsg.checkType(mtSharedListenRequest);
- // XXX: our handlerSubscription is not a POD!
hdrMsg.getPod(*this);
}
void Ipc::SharedListenRequest::pack(TypedMsgHdr &hdrMsg) const
{
hdrMsg.setType(mtSharedListenRequest);
- // XXX: our handlerSubscription is not a POD!
hdrMsg.putPod(*this);
}
}
cbd->errNo = response.errNo;
- cbd->handlerSubscription = por.params.handlerSubscription;
ScheduleCallHere(por.callback);
kickDelayedRequest();
// bits to re-create the listener Comm::Connection descriptor
Ip::Address addr; ///< will be memset and memcopied
int flags = 0;
-
- /// handler to subscribe to Comm::ConnAcceptor when we get the response
- Subscription::Pointer handlerSubscription;
};
class TypedMsgHdr;
public:
Comm::ConnectionPointer conn; ///< opened listening socket
int errNo; ///< errno value from the comm_open_listener() call
- Subscription::Pointer handlerSubscription; ///< The subscription we will pass on to the ConnAcceptor
};
/// Depending on whether SMP is on, either ask Coordinator to send us
#include <sys/un.h>
#endif
+#include <type_traits>
+
class String;
namespace Ipc
Ipc::TypedMsgHdr::getPod(Pod &pod) const
{
#if HAVE_STD_IS_TRIVIALLY_COPYABLE
- // TODO: Enable after fixing Ipc::SharedListenRequest::SharedListenRequest()
- //static_assert(std::is_trivially_copyable<Pod>::value, "getPod() used for a POD");
+ static_assert(std::is_trivially_copyable<Pod>::value, "getPod() used for a POD");
#endif
getFixed(&pod, sizeof(pod));
}
Ipc::TypedMsgHdr::putPod(const Pod &pod)
{
#if HAVE_STD_IS_TRIVIALLY_COPYABLE
- // TODO: Enable after fixing Ipc::SharedListenRequest::pack()
- //static_assert(std::is_trivially_copyable<Pod>::value, "putPod() used for a POD");
+ static_assert(std::is_trivially_copyable<Pod>::value, "putPod() used for a POD");
#endif
putFixed(&pod, sizeof(pod));
}