Catch polymorphic type by reference

This commit is contained in:
Martchus 2019-04-19 22:24:32 +02:00
parent 669aa16479
commit 9b80d662bb
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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");
}
}