diff --git a/include/behaviortree_cpp/utils/safe_any.hpp b/include/behaviortree_cpp/utils/safe_any.hpp index 999e7d526..21c33e1ff 100644 --- a/include/behaviortree_cpp/utils/safe_any.hpp +++ b/include/behaviortree_cpp/utils/safe_any.hpp @@ -134,7 +134,7 @@ class Any } // copy the value (casting into dst). We preserve the destination type. - void copyInto(Any& dst); + void copyInto(Any& dst) const; // this is different from any_cast, because if allows safe // conversions between arithmetic values and from/to string. @@ -346,7 +346,7 @@ inline bool Any::isIntegral() const return _any.type() == typeid(int64_t) || _any.type() == typeid(uint64_t); } -inline void Any::copyInto(Any& dst) +inline void Any::copyInto(Any& dst) const { if(dst.empty()) {