Skip to content

Commit

Permalink
changed return value to std::any
Browse files Browse the repository at this point in the history
  • Loading branch information
riasc committed Oct 10, 2024
1 parent c184604 commit f73d662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/genogrove/TypeRegistry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace genogrove {
// typeNames[typeid(T)] = typeName; // store the type name
std::type_index typeIndex = typeid(T);
if (castFunctions.find(typeIndex) == castFunctions.end()) {
castFunctions[typeIndex] = [](const std::shared_ptr<AnyBase>& obj) -> T {
castFunctions[typeIndex] = [](const std::shared_ptr<AnyBase>& obj) -> std::any {
auto castedObj = std::dynamic_pointer_cast<
AnyType<typename std::remove_reference<T>::type>>(obj);
if(!castedObj) {
Expand Down

0 comments on commit f73d662

Please sign in to comment.