File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,10 @@ class CPPKAFKA_API Buffer {
9292 static_assert (sizeof (T) == sizeof (DataType), " sizeof(T) != sizeof(DataType)" );
9393 }
9494
95+ // Don't allow construction from temporary vectors
96+ template <typename T>
97+ Buffer (std::vector<T>&& data) = delete ;
98+
9599 /* *
96100 * Constructs a buffer from an array
97101 *
@@ -103,9 +107,9 @@ class CPPKAFKA_API Buffer {
103107 static_assert (sizeof (T) == sizeof (DataType), " sizeof(T) != sizeof(DataType)" );
104108 }
105109
106- // Don't allow construction from temporary vectors
107- template <typename T>
108- Buffer (std::vector<T >&& data) = delete ;
110+ // Don't allow construction from temporary arrays
111+ template <typename T, size_t N >
112+ Buffer (std::array<T, N >&& data) = delete ;
109113
110114 /* *
111115 * \brief Construct a buffer from a const string ref
You can’t perform that action at this time.
0 commit comments