Fill in missing const on operator Repr
diff --git a/include/cxx.h b/include/cxx.h
index 0373a38..7b332b4 100644
--- a/include/cxx.h
+++ b/include/cxx.h
@@ -81,7 +81,7 @@
size_t len;
};
Str(Repr) noexcept;
- explicit operator Repr() noexcept;
+ explicit operator Repr() const noexcept;
private:
Repr repr;
@@ -112,7 +112,7 @@
size_t len;
};
Slice(Repr) noexcept;
- explicit operator Repr() noexcept;
+ explicit operator Repr() const noexcept;
private:
Repr repr;
@@ -348,7 +348,7 @@
Slice<T>::Slice(Repr repr_) noexcept : repr(repr_) {}
template <typename T>
-Slice<T>::operator Repr() noexcept {
+Slice<T>::operator Repr() const noexcept {
return this->repr;
}
#endif // CXXBRIDGE05_RUST_SLICE
diff --git a/src/cxx.cc b/src/cxx.cc
index a423df6..254072e 100644
--- a/src/cxx.cc
+++ b/src/cxx.cc
@@ -159,7 +159,7 @@
Str::Str(Repr repr_) noexcept : repr(repr_) {}
-Str::operator Repr() noexcept { return this->repr; }
+Str::operator Repr() const noexcept { return this->repr; }
std::ostream &operator<<(std::ostream &os, const Str &s) {
os.write(s.data(), s.size());