Catch polymorphic type by reference
This commit is contained in:
parent
669aa16479
commit
9b80d662bb
|
@ -10,7 +10,7 @@ set(META_APP_CATEGORIES "Utility;")
|
|||
set(META_GUI_OPTIONAL false)
|
||||
set(META_VERSION_MAJOR 0)
|
||||
set(META_VERSION_MINOR 0)
|
||||
set(META_VERSION_PATCH 7)
|
||||
set(META_VERSION_PATCH 8)
|
||||
set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
|
||||
set(META_CXX_STANDARD 17)
|
||||
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
|
||||
|
|
|
@ -124,7 +124,7 @@ template <typename Type, Traits::EnableIf<Traits::IsSpecializationOf<Type, std::
|
|||
// further occurences: copy previous pointer
|
||||
try {
|
||||
pointer = std::any_cast<Type>(m_pointer[id]);
|
||||
} catch (const std::bad_any_cast) {
|
||||
} catch (const std::bad_any_cast &) {
|
||||
throw ConversionUtilities::ConversionException("Referenced pointer type does not match");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue