Check that Redirect is not passed to exchange()
[junction.git] / junction / ConcurrentMap_Linear.h
index 345080734172c986273985fd4928f366a17a893d..b93d86e342be2ac1a5ab526d7cfafe8dd683eb49 100644 (file)
@@ -135,6 +135,7 @@ public:
 
         Value exchangeValue(Value desired) {
             TURF_ASSERT(desired != Value(ValueTraits::NullValue));
+            TURF_ASSERT(desired != Value(ValueTraits::Redirect));
             TURF_ASSERT(m_cell); // Cell must have been found or inserted
             TURF_TRACE(ConcurrentMap_Linear, 4, "[Mutator::exchangeValue] called", uptr(m_table), uptr(m_value));
             bool mustDouble = false;