@@ -374,19 +374,13 @@ struct map_slot_policy {
374374 return slot->value ;
375375 }
376376
377- // When C++17 is available, we can use std::launder to provide mutable
378- // access to the key for use in node handle.
379- #if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606
380377 static K& mutable_key (slot_type* slot) {
381378 // Still check for kMutableKeys so that we can avoid calling std::launder
382379 // unless necessary because it can interfere with optimizations.
383380 return kMutableKeys ::value ? slot->key
384381 : *std::launder (const_cast <K*>(
385382 std::addressof (slot->value .first )));
386383 }
387- #else // !(defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606)
388- static const K& mutable_key (slot_type* slot) { return key (slot); }
389- #endif
390384
391385 static const K& key (const slot_type* slot) {
392386 return kMutableKeys ::value ? slot->key : slot->value .first ;
@@ -443,15 +437,13 @@ struct map_slot_policy {
443437 typename absl::is_trivially_relocatable<value_type>::type ();
444438
445439 emplace (new_slot);
446- #if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606
447440 if (is_relocatable) {
448441 // TODO(b/247130232,b/251814870): remove casts after fixing warnings.
449442 std::memcpy (static_cast <void *>(std::launder (&new_slot->value )),
450443 static_cast <const void *>(&old_slot->value ),
451444 sizeof (value_type));
452445 return is_relocatable;
453446 }
454- #endif
455447
456448 if (kMutableKeys ::value) {
457449 absl::allocator_traits<Allocator>::construct (
0 commit comments