Files
spark/src/lib/quickbus/rpc/RPCSessionID.h
T

23 lines
584 B
C++

#pragma once
#include "lib/utils/ValueWrapper.h"
#include <memory>
#include <string>
namespace bts {
namespace qbus {
class RPCSessionIDTag {};
typedef utils::ValueWrapper<RPCSessionIDTag, std::string> RPCSessionID;
RPCSessionID make_rpc_session_id();
} // namespace qbus
} // namespace bts
// yeah, this is crazy, but that's how you do it.
namespace std {
template <> struct hash<bts::qbus::RPCSessionID> {
std::size_t operator()(const bts::qbus::RPCSessionID &k) const {
return std::hash<typename bts::qbus::RPCSessionID::Value>()(k.value());
}
};
} // namespace std