We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a917374 commit 2590f21Copy full SHA for 2590f21
include/cereal/details/polymorphic_impl.hpp
@@ -307,7 +307,12 @@ namespace cereal
307
308
// Check to see if we have a previous uncommitted path in unregisteredRelations
309
// that is shorter. If so, ignore this path
310
- auto hint = unregisteredRelations.find( parent );
+ auto hintRange = unregisteredRelations.equal_range( parent );
311
+ auto hint = hintRange.first;
312
+ for( ; hint != hintRange.second; ++hint )
313
+ if( hint->second.first == finalChild )
314
+ break;
315
+
316
const bool uncommittedExists = hint != unregisteredRelations.end();
317
if( uncommittedExists && (hint->second.second.size() <= newLength) )
318
continue;
0 commit comments