|
|
@@ -1,6 +1,7 @@
|
|
|
#ifndef ENTT_CORE_ANY_HPP
|
|
|
#define ENTT_CORE_ANY_HPP
|
|
|
|
|
|
+#include <concepts>
|
|
|
#include <cstddef>
|
|
|
#include <memory>
|
|
|
#include <type_traits>
|
|
|
@@ -222,7 +223,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<typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, basic_any>>>
|
|
|
+ template<typename Type>
|
|
|
+ requires (!std::same_as<std::remove_cvref_t<Type>, basic_any>)
|
|
|
basic_any(Type &&value)
|
|
|
: basic_any{std::in_place_type<std::decay_t<Type>>, std::forward<Type>(value)} {}
|
|
|
|
|
|
@@ -306,7 +308,8 @@ public:
|
|
|
* @param value An instance of an object to use to initialize the wrapper.
|
|
|
* @return This any object.
|
|
|
*/
|
|
|
- template<typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, basic_any>>>
|
|
|
+ template<typename Type>
|
|
|
+ requires (!std::same_as<std::remove_cvref_t<Type>, basic_any>)
|
|
|
basic_any &operator=(Type &&value) {
|
|
|
emplace<std::decay_t<Type>>(std::forward<Type>(value));
|
|
|
return *this;
|