From b69c7d880caddfc25bf348dbcfe9d45fdd8bc6e6 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 21 Feb 2020 12:51:36 -0800 Subject: Export of internal Abseil changes -- 00f5301405423005d9129935c05f20155536cc1a by CJ Johnson : Removes usage of std::aligned_storage from Abseil implementation details PiperOrigin-RevId: 296492301 -- fc11d15f91764612fba080669d2381dc181df52b by Abseil Team : Fix absl::bind_front documentation. PiperOrigin-RevId: 296482945 -- 0164c595c129c46bf21ae74eba5399a1da5f140b by Gennadiy Rozental : Automated g4 rollback of changelist 296320700. PiperOrigin-RevId: 296439968 -- 1eb295700758ca0894d872b2de7c675b4ad679af by Abseil Team : Removes duplicate comments. PiperOrigin-RevId: 296433214 -- c30c01caae02d2fa4ef783d988de6bebb9757c39 by Derek Mauro : Merge GitHub #621: Add RISCV support to GetProgramCounter() Fixes #621 PiperOrigin-RevId: 296351174 -- 95d4498167596fd7543e025bdfe9a8da9e2ca3c8 by Abseil Team : Automated g4 rollback of changelist 296320700. PiperOrigin-RevId: 296348701 -- b193f0543e0cec54dddb2ed51f45dc489c8d06d5 by Gennadiy Rozental : Change TryParse interface to return managed value. In addition introduce companion StoreValue routine which consumes pointer to source value and stores the value inside of FlagImpl. In a follow up CL we will change StoreValue implementation to behave differently depending on "value storage kind". We also rename default_src_ to default_value_. PiperOrigin-RevId: 296320700 -- 57e942b485d12912a0a8d0d0b35fa2a62847020f by Derek Mauro : Merge GitHub #622 * Add missing #ifdef conditionals for ABSL_HAVE_VDSO_SUPPORT PiperOrigin-RevId: 296272830 GitOrigin-RevId: 00f5301405423005d9129935c05f20155536cc1a Change-Id: I1b05eeaf1280f95fb0a2c5f3654995a87c792893 --- absl/strings/cord.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'absl/strings') diff --git a/absl/strings/cord.cc b/absl/strings/cord.cc index cc0cc9d..d9503ae 100644 --- a/absl/strings/cord.cc +++ b/absl/strings/cord.cc @@ -63,16 +63,16 @@ namespace { // Type used with std::allocator for allocating and deallocating // `CordRepExternal`. std::allocator is used because it opaquely handles the // different new / delete overloads available on a given platform. -using ExternalAllocType = - absl::aligned_storage_t; +struct alignas(absl::cord_internal::ExternalRepAlignment()) ExternalAllocType { + unsigned char value[absl::cord_internal::ExternalRepAlignment()]; +}; // Returns the number of objects to pass in to std::allocator // allocate() and deallocate() to create enough room for `CordRepExternal` with // `releaser_size` bytes on the end. constexpr size_t GetExternalAllocNumObjects(size_t releaser_size) { // Be sure to round up since `releaser_size` could be smaller than - // sizeof(ExternalAllocType)`. + // `sizeof(ExternalAllocType)`. return (sizeof(CordRepExternal) + releaser_size + sizeof(ExternalAllocType) - 1) / sizeof(ExternalAllocType); -- cgit v1.2.3