mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-02 03:28:01 +00:00
Delete construction of buffer with rvalue arrays
This commit is contained in:
@@ -92,6 +92,10 @@ public:
|
|||||||
static_assert(sizeof(T) == sizeof(DataType), "sizeof(T) != sizeof(DataType)");
|
static_assert(sizeof(T) == sizeof(DataType), "sizeof(T) != sizeof(DataType)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't allow construction from temporary vectors
|
||||||
|
template <typename T>
|
||||||
|
Buffer(std::vector<T>&& data) = delete;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a buffer from an array
|
* Constructs a buffer from an array
|
||||||
*
|
*
|
||||||
@@ -103,9 +107,9 @@ public:
|
|||||||
static_assert(sizeof(T) == sizeof(DataType), "sizeof(T) != sizeof(DataType)");
|
static_assert(sizeof(T) == sizeof(DataType), "sizeof(T) != sizeof(DataType)");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't allow construction from temporary vectors
|
// Don't allow construction from temporary arrays
|
||||||
template <typename T>
|
template <typename T, size_t N>
|
||||||
Buffer(std::vector<T>&& data) = delete;
|
Buffer(std::array<T, N>&& data) = delete;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Construct a buffer from a const string ref
|
* \brief Construct a buffer from a const string ref
|
||||||
|
|||||||
Reference in New Issue
Block a user