BLI: add utility to check if type is any specific type
This adds `blender::is_same_any_v` which is the almost the same as `std::is_same_v`. The difference is that it allows for checking multiple types at the same time. Differential Revision: https://developer.blender.org/D13673
This commit is contained in:
@@ -753,8 +753,7 @@ namespace detail {
|
||||
template<typename StorageT> inline GVArrayAnyExtraInfo GVArrayAnyExtraInfo::get()
|
||||
{
|
||||
static_assert(std::is_base_of_v<GVArrayImpl, StorageT> ||
|
||||
std::is_same_v<StorageT, const GVArrayImpl *> ||
|
||||
std::is_same_v<StorageT, std::shared_ptr<const GVArrayImpl>>);
|
||||
is_same_any_v<StorageT, const GVArrayImpl *, std::shared_ptr<const GVArrayImpl>>);
|
||||
|
||||
if constexpr (std::is_base_of_v<GVArrayImpl, StorageT>) {
|
||||
return {[](const void *buffer) {
|
||||
|
Reference in New Issue
Block a user