mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-01 11:07:56 +00:00
Add more tests to producer
This commit is contained in:
@@ -11,10 +11,10 @@ public:
|
||||
using DataType = unsigned char;
|
||||
|
||||
Buffer();
|
||||
Buffer(const DataType* data, size_t size);
|
||||
template <typename ForwardIterator>
|
||||
Buffer(const ForwardIterator& start, const ForwardIterator& end) :
|
||||
data_((const DataType*)&*start), size_(std::distance(start, end)) {
|
||||
template <typename T>
|
||||
Buffer(const T* data, size_t size)
|
||||
: data_(reinterpret_cast<const DataType*>(data)), size_(size) {
|
||||
static_assert(sizeof(T) == 1, "Buffer must point to elements of 1 byte");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user