mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Add operator<< for fair::mq::Transport
This commit is contained in:
parent
a3d56b9aeb
commit
ed2dcedf03
|
@ -12,6 +12,7 @@
|
||||||
#include <fairmq/tools/Strings.h>
|
#include <fairmq/tools/Strings.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <ostream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
@ -60,6 +61,11 @@ try {
|
||||||
throw TransportError(tools::ToString("Unknown transport provided: ", transport));
|
throw TransportError(tools::ToString("Unknown transport provided: ", transport));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline std::ostream& operator<<(std::ostream& os, const Transport& transport)
|
||||||
|
{
|
||||||
|
return os << TransportName(transport);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace fair::mq
|
} // namespace fair::mq
|
||||||
|
|
||||||
#endif /* FAIR_MQ_TRANSPORTS_H */
|
#endif /* FAIR_MQ_TRANSPORTS_H */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user