Skip to content

Commit dcdf224

Browse files
fix swig problems with maybe_owned_vector
Signed-off-by: Alexandr Guzhva <alexanderguzhva@gmail.com>
1 parent e26b313 commit dcdf224

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

faiss/impl/maybe_owned_vector.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ struct MaybeOwnedVector {
2222
using self_type = MaybeOwnedVector<T>;
2323
using iterator = typename std::vector<T>::iterator;
2424
using const_iterator = typename std::vector<T>::const_iterator;
25-
using reference = typename std::vector<T>::reference;
26-
using const_reference = typename std::vector<T>::const_reference;
2725
using size_type = typename std::vector<T>::size_type;
2826

2927
bool is_owned = true;
@@ -166,15 +164,15 @@ struct MaybeOwnedVector {
166164
return c_ptr[idx];
167165
}
168166

169-
iterator at(size_type pos) {
167+
T& at(size_type pos) {
170168
FAISS_ASSERT_MSG(
171169
is_owned,
172170
"This operation cannot be performed on a viewed vector");
173171

174172
return owned_data.at(pos);
175173
}
176174

177-
const_iterator at(size_type pos) const {
175+
const T& at(size_type pos) const {
178176
FAISS_ASSERT_MSG(
179177
is_owned,
180178
"This operation cannot be performed on a viewed vector");

0 commit comments

Comments
 (0)