diff --git a/include/zenohcxx/api.hxx b/include/zenohcxx/api.hxx index 43f42260..0b7bdb3c 100644 --- a/include/zenohcxx/api.hxx +++ b/include/zenohcxx/api.hxx @@ -390,7 +390,7 @@ class Str : public Owned<::z_owned_str_t> { }; class KeyExpr; -class KeyExprView; +struct KeyExprView; /// Empty type used to distinguish checked and unchecked constructing of KeyExprView struct KeyExprUnchecked { diff --git a/include/zenohcxx/impl.hxx b/include/zenohcxx/impl.hxx index d9517a4f..3f93f0e0 100644 --- a/include/zenohcxx/impl.hxx +++ b/include/zenohcxx/impl.hxx @@ -667,8 +667,7 @@ inline bool z::Session::send_join(ErrNo& error) { class _Resolved { public: _Resolved(const z::Session& s, const z::KeyExprView& source) - : str(std::move(source.resolve(s))), - keyexpr(str.check() ? z::KeyExprView(str.c_str(), KeyExprUnchecked()) : source) {} + : str(source.resolve(s)), keyexpr(str.check() ? z::KeyExprView(str.c_str(), KeyExprUnchecked()) : source) {} operator const z::KeyExprView&() const { return keyexpr; } private: