|
|
@@ -45,7 +45,7 @@ public:
|
|
|
*/
|
|
|
template<typename Type>
|
|
|
meta_sequence_container(std::in_place_type_t<Type>, any instance) ENTT_NOEXCEPT
|
|
|
- : value_type_node{internal::meta_node<std::remove_const_t<std::remove_reference_t<typename Type::value_type>>>::resolve()},
|
|
|
+ : value_type_node{internal::meta_node<std::remove_cv_t<std::remove_reference_t<typename Type::value_type>>>::resolve()},
|
|
|
size_fn{&meta_sequence_container_traits<Type>::size},
|
|
|
resize_fn{&meta_sequence_container_traits<Type>::resize},
|
|
|
iter_fn{&meta_sequence_container_traits<Type>::iter},
|
|
|
@@ -95,9 +95,9 @@ public:
|
|
|
template<typename Type>
|
|
|
meta_associative_container(std::in_place_type_t<Type>, any instance) ENTT_NOEXCEPT
|
|
|
: key_only_container{meta_associative_container_traits<Type>::key_only},
|
|
|
- key_type_node{internal::meta_node<std::remove_const_t<std::remove_reference_t<typename Type::key_type>>>::resolve()},
|
|
|
+ key_type_node{internal::meta_node<std::remove_cv_t<std::remove_reference_t<typename Type::key_type>>>::resolve()},
|
|
|
mapped_type_node{nullptr},
|
|
|
- value_type_node{internal::meta_node<std::remove_const_t<std::remove_reference_t<typename Type::value_type>>>::resolve()},
|
|
|
+ value_type_node{internal::meta_node<std::remove_cv_t<std::remove_reference_t<typename Type::value_type>>>::resolve()},
|
|
|
size_fn{&meta_associative_container_traits<Type>::size},
|
|
|
clear_fn{&meta_associative_container_traits<Type>::clear},
|
|
|
iter_fn{&meta_associative_container_traits<Type>::iter},
|
|
|
@@ -106,7 +106,7 @@ public:
|
|
|
find_fn{&meta_associative_container_traits<Type>::find},
|
|
|
storage{std::move(instance)} {
|
|
|
if constexpr(!meta_associative_container_traits<Type>::key_only) {
|
|
|
- mapped_type_node = internal::meta_node<std::remove_const_t<std::remove_reference_t<typename Type::mapped_type>>>::resolve();
|
|
|
+ mapped_type_node = internal::meta_node<std::remove_cv_t<std::remove_reference_t<typename Type::mapped_type>>>::resolve();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -149,7 +149,7 @@ class meta_any {
|
|
|
|
|
|
template<typename Type>
|
|
|
static void basic_vtable([[maybe_unused]] const operation op, [[maybe_unused]] const any &value, [[maybe_unused]] void *other) {
|
|
|
- static_assert(std::is_same_v<std::remove_reference_t<std::remove_const_t<Type>>, Type>, "Invalid type");
|
|
|
+ static_assert(std::is_same_v<std::remove_cv_t<std::remove_reference_t<Type>>, Type>, "Invalid type");
|
|
|
|
|
|
if constexpr(!std::is_void_v<Type>) {
|
|
|
switch(op) {
|
|
|
@@ -211,8 +211,8 @@ public:
|
|
|
template<typename Type, typename... Args>
|
|
|
explicit meta_any(std::in_place_type_t<Type>, Args &&...args)
|
|
|
: storage{std::in_place_type<Type>, std::forward<Args>(args)...},
|
|
|
- node{internal::meta_node<std::remove_const_t<std::remove_reference_t<Type>>>::resolve()},
|
|
|
- vtable{&basic_vtable<std::remove_const_t<std::remove_reference_t<Type>>>} {}
|
|
|
+ node{internal::meta_node<std::remove_cv_t<std::remove_reference_t<Type>>>::resolve()},
|
|
|
+ vtable{&basic_vtable<std::remove_cv_t<std::remove_reference_t<Type>>>} {}
|
|
|
|
|
|
/**
|
|
|
* @brief Constructs a wrapper from a given value.
|
|
|
@@ -221,7 +221,7 @@ public:
|
|
|
*/
|
|
|
template<typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, meta_any>>>
|
|
|
meta_any(Type &&value)
|
|
|
- : meta_any{std::in_place_type<std::remove_const_t<std::remove_reference_t<Type>>>, std::forward<Type>(value)} {}
|
|
|
+ : meta_any{std::in_place_type<std::remove_cv_t<std::remove_reference_t<Type>>>, std::forward<Type>(value)} {}
|
|
|
|
|
|
/**
|
|
|
* @brief Copy constructor.
|
|
|
@@ -434,7 +434,7 @@ public:
|
|
|
*/
|
|
|
template<typename Type>
|
|
|
[[nodiscard]] meta_any allow_cast() const {
|
|
|
- const auto other = allow_cast(internal::meta_node<std::remove_const_t<std::remove_reference_t<Type>>>::resolve());
|
|
|
+ const auto other = allow_cast(internal::meta_node<std::remove_cv_t<std::remove_reference_t<Type>>>::resolve());
|
|
|
|
|
|
if constexpr(std::is_reference_v<Type> && !std::is_const_v<std::remove_reference_t<Type>>) {
|
|
|
return other.storage.owner() ? other : meta_any{};
|
|
|
@@ -450,7 +450,7 @@ public:
|
|
|
*/
|
|
|
template<typename Type>
|
|
|
bool allow_cast() {
|
|
|
- if(auto other = std::as_const(*this).allow_cast(internal::meta_node<std::remove_const_t<std::remove_reference_t<Type>>>::resolve()); other) {
|
|
|
+ if(auto other = std::as_const(*this).allow_cast(internal::meta_node<std::remove_cv_t<std::remove_reference_t<Type>>>::resolve()); other) {
|
|
|
if(other.storage.owner()) {
|
|
|
std::swap(*this, other);
|
|
|
return true;
|
|
|
@@ -466,9 +466,9 @@ public:
|
|
|
template<typename Type, typename... Args>
|
|
|
void emplace(Args &&...args) {
|
|
|
release();
|
|
|
- vtable = &basic_vtable<std::remove_const_t<std::remove_reference_t<Type>>>;
|
|
|
+ vtable = &basic_vtable<std::remove_cv_t<std::remove_reference_t<Type>>>;
|
|
|
storage.emplace<Type>(std::forward<Args>(args)...);
|
|
|
- node = internal::meta_node<std::remove_const_t<std::remove_reference_t<Type>>>::resolve();
|
|
|
+ node = internal::meta_node<std::remove_cv_t<std::remove_reference_t<Type>>>::resolve();
|
|
|
}
|
|
|
|
|
|
/*! @copydoc any::assign */
|