Add operator<< for TopicPartition

This commit is contained in:
Matias Fontanini
2016-06-15 07:44:28 -07:00
parent 6877c4be03
commit 9e79321a1f
5 changed files with 49 additions and 0 deletions

View File

@@ -31,6 +31,7 @@
#define CPPKAFKA_TOPIC_PARTITION_H
#include <string>
#include <iosfwd>
#include <cstdint>
namespace cppkafka {
@@ -104,6 +105,11 @@ public:
* Gets the offset
*/
int64_t get_offset() const;
/**
* Print to a stream
*/
friend std::ostream& operator<<(std::ostream& output, const TopicPartition& rhs);
private:
std::string topic_;
int partition_;