any: drop useless remove_const_t

This commit is contained in:
Michele Caini
2022-05-29 12:10:32 +02:00
parent 754fe9f4ec
commit fa48c76dd1

View File

@@ -463,7 +463,7 @@ Type any_cast(basic_any<Len, Align> &&data) noexcept {
/*! @copydoc any_cast */
template<typename Type, std::size_t Len, std::size_t Align>
const Type *any_cast(const basic_any<Len, Align> *data) noexcept {
const auto &info = type_id<std::remove_cv_t<std::remove_reference_t<Type>>>();
const auto &info = type_id<std::remove_cv_t<Type>>();
return static_cast<const Type *>(data->data(info));
}
@@ -474,7 +474,7 @@ Type *any_cast(basic_any<Len, Align> *data) noexcept {
// last attempt to make wrappers for const references return their values
return any_cast<Type>(&std::as_const(*data));
} else {
const auto &info = type_id<std::remove_cv_t<std::remove_reference_t<Type>>>();
const auto &info = type_id<std::remove_cv_t<Type>>();
return static_cast<Type *>(data->data(info));
}
}