any: drop useless remove_const_t
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user