Fill in missing const on Fn member functions
diff --git a/include/cxx.h b/include/cxx.h
index 8bdbc90..5de479c 100644
--- a/include/cxx.h
+++ b/include/cxx.h
@@ -154,8 +154,8 @@
template <typename Ret, typename... Args, bool Throws>
class Fn<Ret(Args...), Throws> {
public:
- Ret operator()(Args... args) noexcept(!Throws);
- Fn operator*() noexcept;
+ Ret operator()(Args... args) const noexcept(!Throws);
+ Fn operator*() const noexcept;
private:
Ret (*trampoline)(Args..., void *fn) noexcept(!Throws);
@@ -201,12 +201,12 @@
#endif // CXXBRIDGE02_RUST_BITCOPY
template <typename Ret, typename... Args, bool Throws>
-Ret Fn<Ret(Args...), Throws>::operator()(Args... args) noexcept(!Throws) {
+Ret Fn<Ret(Args...), Throws>::operator()(Args... args) const noexcept(!Throws) {
return (*this->trampoline)(std::move(args)..., this->fn);
}
template <typename Ret, typename... Args, bool Throws>
-Fn<Ret(Args...), Throws> Fn<Ret(Args...), Throws>::operator*() noexcept {
+Fn<Ret(Args...), Throws> Fn<Ret(Args...), Throws>::operator*() const noexcept {
return *this;
}