diff --git a/tenseal/cpp/tensors/ckkstensor.cpp b/tenseal/cpp/tensors/ckkstensor.cpp index 8390822e..1bae66fd 100644 --- a/tenseal/cpp/tensors/ckkstensor.cpp +++ b/tenseal/cpp/tensors/ckkstensor.cpp @@ -17,9 +17,10 @@ CKKSTensor::CKKSTensor(const shared_ptr& ctx, vector enc_data; vector enc_shape = tensor.shape(); - auto data = tensor.batch(0); + decltype(tensor.batch(0)) data; size_t size; if (batch) { + data = tensor.batch(0); _batch_size = enc_shape[0]; enc_shape.erase(enc_shape.begin()); size = tensor.batch(0).size();