@@ -374,19 +374,13 @@ struct map_slot_policy {
374
374
return slot->value ;
375
375
}
376
376
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
380
377
static K& mutable_key (slot_type* slot) {
381
378
// Still check for kMutableKeys so that we can avoid calling std::launder
382
379
// unless necessary because it can interfere with optimizations.
383
380
return kMutableKeys ::value ? slot->key
384
381
: *std::launder (const_cast <K*>(
385
382
std::addressof (slot->value .first )));
386
383
}
387
- #else // !(defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606)
388
- static const K& mutable_key (slot_type* slot) { return key (slot); }
389
- #endif
390
384
391
385
static const K& key (const slot_type* slot) {
392
386
return kMutableKeys ::value ? slot->key : slot->value .first ;
@@ -443,15 +437,13 @@ struct map_slot_policy {
443
437
typename absl::is_trivially_relocatable<value_type>::type ();
444
438
445
439
emplace (new_slot);
446
- #if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606
447
440
if (is_relocatable) {
448
441
// TODO(b/247130232,b/251814870): remove casts after fixing warnings.
449
442
std::memcpy (static_cast <void *>(std::launder (&new_slot->value )),
450
443
static_cast <const void *>(&old_slot->value ),
451
444
sizeof (value_type));
452
445
return is_relocatable;
453
446
}
454
- #endif
455
447
456
448
if (kMutableKeys ::value) {
457
449
absl::allocator_traits<Allocator>::construct (
0 commit comments