diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index a5969e95d..ac16debb4 100644 --- a/src/entt/meta/meta.hpp +++ b/src/entt/meta/meta.hpp @@ -293,7 +293,8 @@ public: * @tparam Type Type of object to use to initialize the wrapper. * @param value An instance of an object to use to initialize the wrapper. */ - template, meta_any>>> + template + requires (!std::same_as, meta_any>) meta_any(Type &&value) : meta_any{locator::value_or(), std::forward(value)} {} @@ -303,7 +304,8 @@ public: * @param area The context from which to search for meta types. * @param value An instance of an object to use to initialize the wrapper. */ - template, meta_any>>> + template + requires (!std::same_as, meta_any>) meta_any(const meta_ctx &area, Type &&value) : meta_any{area, std::in_place_type>, std::forward(value)} {} @@ -383,7 +385,8 @@ public: * @param value An instance of an object to use to initialize the wrapper. * @return This meta any object. */ - template, meta_any>>> + template + requires (!std::same_as, meta_any>) meta_any &operator=(Type &&value) { emplace>(std::forward(value)); return *this; @@ -675,7 +678,8 @@ template /*! @brief Opaque pointers to instances of any type. */ class meta_handle { - template, meta_any>>> + template + requires std::same_as, meta_any> meta_handle(int, Type &value, Args &&...args) : any{std::forward(args)..., value.as_ref()} {} @@ -693,7 +697,8 @@ public: * @param ctx The context from which to search for meta types. * @param value An instance of an object to use to initialize the handle. */ - template, meta_handle>>> + template + requires (!std::same_as, meta_handle>) meta_handle(const meta_ctx &ctx, Type &value) : meta_handle{0, value, ctx} {} @@ -702,7 +707,8 @@ public: * @tparam Type Type of object to use to initialize the handle. * @param value An instance of an object to use to initialize the handle. */ - template, meta_handle>>> + template + requires (!std::same_as, meta_handle>) meta_handle(Type &value) : meta_handle{0, value} {}