Browse Source

meta: make return type explicit for operator=

Michele Caini 1 year ago
parent
commit
32ffd625ff
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/entt/meta/meta.hpp

+ 2 - 3
src/entt/meta/meta.hpp

@@ -360,9 +360,8 @@ public:
      * @param value An instance of an object to use to initialize the wrapper.
      * @return This meta any object.
      */
-    template<typename Type>
-    std::enable_if_t<!std::is_same_v<std::decay_t<Type>, meta_any>, meta_any &>
-    operator=(Type &&value) {
+    template<typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, meta_any>>>
+    meta_any &operator=(Type &&value) {
         emplace<std::decay_t<Type>>(std::forward<Type>(value));
         return *this;
     }