Skip to content

Commit 2940d17

Browse files
authored
Merge pull request #29 from HannahShiSFB/upgrade-to-20250512.1
Update to abseil-cpp 20250512.1
2 parents cfe057d + bc88ce0 commit 2940d17

File tree

217 files changed

+7269
-7254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+7269
-7254
lines changed

CMake/AbseilDll.cmake

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set(ABSL_INTERNAL_DLL_FILES
1010
"base/config.h"
1111
"base/const_init.h"
1212
"base/dynamic_annotations.h"
13+
"base/fast_type_id.h"
1314
"base/internal/atomic_hook.h"
1415
"base/internal/cycleclock.cc"
1516
"base/internal/cycleclock.h"
@@ -18,15 +19,13 @@ set(ABSL_INTERNAL_DLL_FILES
1819
"base/internal/dynamic_annotations.h"
1920
"base/internal/endian.h"
2021
"base/internal/errno_saver.h"
21-
"base/internal/fast_type_id.h"
2222
"base/internal/hide_ptr.h"
2323
"base/internal/identity.h"
24-
"base/internal/invoke.h"
25-
"base/internal/inline_variable.h"
24+
"base/internal/iterator_traits.h"
2625
"base/internal/low_level_alloc.cc"
2726
"base/internal/low_level_alloc.h"
2827
"base/internal/low_level_scheduling.h"
29-
"base/internal/nullability_impl.h"
28+
"base/internal/nullability_deprecated.h"
3029
"base/internal/per_thread_tls.h"
3130
"base/internal/poison.cc"
3231
"base/internal/poison.h"
@@ -83,6 +82,7 @@ set(ABSL_INTERNAL_DLL_FILES
8382
"container/internal/container_memory.h"
8483
"container/internal/hash_function_defaults.h"
8584
"container/internal/hash_policy_traits.h"
85+
"container/internal/hashtable_control_bytes.h"
8686
"container/internal/hashtable_debug.h"
8787
"container/internal/hashtable_debug_hooks.h"
8888
"container/internal/hashtablez_sampler.cc"
@@ -94,6 +94,7 @@ set(ABSL_INTERNAL_DLL_FILES
9494
"container/internal/raw_hash_map.h"
9595
"container/internal/raw_hash_set.cc"
9696
"container/internal/raw_hash_set.h"
97+
"container/internal/raw_hash_set_resize_impl.h"
9798
"container/internal/tracked.h"
9899
"container/node_hash_map.h"
99100
"container/node_hash_set.h"
@@ -126,6 +127,7 @@ set(ABSL_INTERNAL_DLL_FILES
126127
"debugging/symbolize.h"
127128
"debugging/internal/address_is_readable.cc"
128129
"debugging/internal/address_is_readable.h"
130+
"debugging/internal/addresses.h"
129131
"debugging/internal/bounded_utf8_length_sequence.h"
130132
"debugging/internal/decode_rust_punycode.cc"
131133
"debugging/internal/decode_rust_punycode.h"
@@ -160,6 +162,7 @@ set(ABSL_INTERNAL_DLL_FILES
160162
"hash/internal/spy_hash_state.h"
161163
"hash/internal/low_level_hash.h"
162164
"hash/internal/low_level_hash.cc"
165+
"hash/internal/weakly_mixed_integer.h"
163166
"log/absl_check.h"
164167
"log/absl_log.h"
165168
"log/absl_vlog_is_on.h"
@@ -201,7 +204,6 @@ set(ABSL_INTERNAL_DLL_FILES
201204
"log/initialize.cc"
202205
"log/initialize.h"
203206
"log/log.h"
204-
"log/log_entry.cc"
205207
"log/log_entry.h"
206208
"log/log_sink.cc"
207209
"log/log_sink.h"
@@ -238,8 +240,8 @@ set(ABSL_INTERNAL_DLL_FILES
238240
"random/internal/nonsecure_base.h"
239241
"random/internal/pcg_engine.h"
240242
"random/internal/platform.h"
241-
"random/internal/pool_urbg.cc"
242-
"random/internal/pool_urbg.h"
243+
"random/internal/entropy_pool.cc"
244+
"random/internal/entropy_pool.h"
243245
"random/internal/randen.cc"
244246
"random/internal/randen.h"
245247
"random/internal/randen_detect.cc"
@@ -286,7 +288,6 @@ set(ABSL_INTERNAL_DLL_FILES
286288
"strings/cord.h"
287289
"strings/cord_analysis.cc"
288290
"strings/cord_analysis.h"
289-
"strings/cord_buffer.cc"
290291
"strings/cord_buffer.h"
291292
"strings/escaping.cc"
292293
"strings/escaping.h"
@@ -432,20 +433,11 @@ set(ABSL_INTERNAL_DLL_FILES
432433
"time/internal/cctz/src/tzfile.h"
433434
"time/internal/cctz/src/zone_info_source.cc"
434435
"types/any.h"
435-
"types/bad_any_cast.cc"
436-
"types/bad_any_cast.h"
437-
"types/bad_optional_access.cc"
438-
"types/bad_optional_access.h"
439-
"types/bad_variant_access.cc"
440-
"types/bad_variant_access.h"
441436
"types/compare.h"
442-
"types/internal/variant.h"
443437
"types/optional.h"
444-
"types/internal/optional.h"
445438
"types/span.h"
446439
"types/internal/span.h"
447440
"types/variant.h"
448-
"utility/internal/if_constexpr.h"
449441
"utility/utility.h"
450442
"debugging/leak_check.cc"
451443
)
@@ -496,10 +488,6 @@ set(ABSL_INTERNAL_DLL_TARGETS
496488
"any"
497489
"any_invocable"
498490
"atomic_hook"
499-
"bad_any_cast"
500-
"bad_any_cast_impl"
501-
"bad_optional_access"
502-
"bad_variant_access"
503491
"base"
504492
"base_internal"
505493
"bind_front"
@@ -731,10 +719,8 @@ int main() { return 0; }
731719

732720
if(ABSL_INTERNAL_AT_LEAST_CXX20)
733721
set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_20)
734-
elseif(ABSL_INTERNAL_AT_LEAST_CXX17)
735-
set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_17)
736722
else()
737-
set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_14)
723+
set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_17)
738724
endif()
739725

740726
function(absl_internal_dll_contains)
@@ -899,7 +885,7 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
899885
)
900886

901887
if(ABSL_PROPAGATE_CXX_STD)
902-
# Abseil libraries require C++14 as the current minimum standard. When
888+
# Abseil libraries require C++17 as the current minimum standard. When
903889
# compiled with a higher minimum (either because it is the compiler's
904890
# default or explicitly requested), then Abseil requires that standard.
905891
target_compile_features(${_dll} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE})

CMake/AbseilHelpers.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
301301
endif()
302302

303303
if(ABSL_PROPAGATE_CXX_STD)
304-
# Abseil libraries require C++14 as the current minimum standard. When
304+
# Abseil libraries require C++17 as the current minimum standard. When
305305
# compiled with a higher standard (either because it is the compiler's
306306
# default or explicitly requested), then Abseil requires that standard.
307307
target_compile_features(${_NAME} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE})
@@ -338,7 +338,7 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
338338
target_compile_definitions(${_NAME} INTERFACE ${ABSL_CC_LIB_DEFINES})
339339

340340
if(ABSL_PROPAGATE_CXX_STD)
341-
# Abseil libraries require C++14 as the current minimum standard.
341+
# Abseil libraries require C++17 as the current minimum standard.
342342
# Top-level application CMake projects should ensure a consistent C++
343343
# standard for all compiled sources by setting CMAKE_CXX_STANDARD.
344344
target_compile_features(${_NAME} INTERFACE ${ABSL_INTERNAL_CXX_STD_FEATURE})
@@ -450,7 +450,7 @@ function(absl_cc_test)
450450
set_property(TARGET ${_NAME} PROPERTY FOLDER ${ABSL_IDE_FOLDER}/test)
451451

452452
if(ABSL_PROPAGATE_CXX_STD)
453-
# Abseil libraries require C++14 as the current minimum standard.
453+
# Abseil libraries require C++17 as the current minimum standard.
454454
# Top-level application CMake projects should ensure a consistent C++
455455
# standard for all compiled sources by setting CMAKE_CXX_STANDARD.
456456
target_compile_features(${_NAME} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE})

CMake/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ cmake_minimum_required(VERSION 3.16)
4343
project(my_app_project)
4444
4545
# Pick the C++ standard to compile with.
46-
# Abseil currently supports C++14, C++17, and C++20.
47-
set(CMAKE_CXX_STANDARD 14)
46+
# Abseil currently supports C++17 and C++20.
47+
set(CMAKE_CXX_STANDARD 17)
4848
set(CMAKE_CXX_STANDARD_REQUIRED ON)
4949
5050
add_subdirectory(abseil-cpp)

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ if (POLICY CMP0141)
2323
cmake_policy(SET CMP0141 NEW)
2424
endif (POLICY CMP0141)
2525

26-
project(absl LANGUAGES CXX VERSION 20250127)
27-
set(ABSL_SOVERSION "2501.0.0")
26+
project(absl LANGUAGES CXX VERSION 20250512)
27+
set(ABSL_SOVERSION "2505.0.0")
2828
include(CTest)
2929

3030
# Output directory is correct by default for most build setups. However, when
@@ -46,7 +46,7 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
4646
set(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
4747

4848
option(ABSL_PROPAGATE_CXX_STD
49-
"Use CMake C++ standard meta features (e.g. cxx_std_14) that propagate to targets that link to Abseil"
49+
"Use CMake C++ standard meta features (e.g. cxx_std_17) that propagate to targets that link to Abseil"
5050
ON)
5151

5252
option(ABSL_USE_SYSTEM_INCLUDES

MODULE.bazel

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
module(
1818
name = "abseil-cpp",
19-
version = "20250127.1",
19+
version = "20250512.1",
2020
compatibility_level = 1,
2121
)
2222

@@ -25,22 +25,19 @@ cc_configure = use_extension("@rules_cc//cc:extensions.bzl",
2525
dev_dependency = True)
2626
use_repo(cc_configure, "local_config_cc")
2727

28-
# Only direct dependencies need to be listed below.
29-
# Please keep the versions in sync with the versions in the WORKSPACE file.
30-
31-
bazel_dep(name = "rules_cc", version = "0.0.17")
28+
bazel_dep(name = "rules_cc", version = "0.1.1")
3229
bazel_dep(name = "bazel_skylib", version = "1.7.1")
33-
bazel_dep(name = "platforms", version = "0.0.10")
30+
bazel_dep(name = "platforms", version = "0.0.11")
3431

3532
bazel_dep(
3633
name = "google_benchmark",
37-
version = "1.8.5",
34+
version = "1.9.2",
3835
dev_dependency = True,
3936
)
4037

4138
# Note: Googletest is NOT a dev_dependency. Some Abseil test utilities
4239
# intended to be used by Abseil users depend on GoogleTest.
4340
bazel_dep(
4441
name = "googletest",
45-
version = "1.15.2",
42+
version = "1.17.0",
4643
)

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Abseil - C++ Common Libraries
22

33
The repository contains the Abseil C++ library code. Abseil is an open-source
4-
collection of C++ code (compliant to C++14) designed to augment the C++
4+
collection of C++ code (compliant to C++17) designed to augment the C++
55
standard library.
66

77
## Table of Contents
@@ -99,24 +99,23 @@ Abseil contains the following C++ library components:
9999
<br /> The `memory` library contains memory management facilities that augment
100100
C++'s `<memory>` library.
101101
* [`meta`](absl/meta/)
102-
<br /> The `meta` library contains compatible versions of type checks
103-
available within C++14 and C++17 versions of the C++ `<type_traits>` library.
102+
<br /> The `meta` library contains type checks
103+
similar to those available in the C++ `<type_traits>` library.
104104
* [`numeric`](absl/numeric/)
105105
<br /> The `numeric` library contains 128-bit integer types as well as
106106
implementations of C++20's bitwise math functions.
107107
* [`profiling`](absl/profiling/)
108108
<br /> The `profiling` library contains utility code for profiling C++
109109
entities. It is currently a private dependency of other Abseil libraries.
110110
* [`random`](absl/random/)
111-
<br /> The `random` library contains functions for generating psuedorandom
111+
<br /> The `random` library contains functions for generating pseudorandom
112112
values.
113113
* [`status`](absl/status/)
114114
<br /> The `status` library contains abstractions for error handling,
115115
specifically `absl::Status` and `absl::StatusOr<T>`.
116116
* [`strings`](absl/strings/)
117117
<br /> The `strings` library contains a variety of strings routines and
118-
utilities, including a C++14-compatible version of the C++17
119-
`std::string_view` type.
118+
utilities.
120119
* [`synchronization`](absl/synchronization/)
121120
<br /> The `synchronization` library contains concurrency primitives (Abseil's
122121
`absl::Mutex` class, an alternative to `std::mutex`) and a variety of
@@ -126,8 +125,7 @@ Abseil contains the following C++ library components:
126125
points in time, durations of time, and formatting and parsing time within
127126
time zones.
128127
* [`types`](absl/types/)
129-
<br /> The `types` library contains non-container utility types, like a
130-
C++14-compatible version of the C++17 `std::optional` type.
128+
<br /> The `types` library contains non-container utility types.
131129
* [`utility`](absl/utility/)
132130
<br /> The `utility` library contains utility and helper code.
133131

absl/abseil.podspec.gen.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@
4343
'USE_HEADERMAP' => 'NO',
4444
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
4545
}
46-
s.ios.deployment_target = '9.0'
47-
s.osx.deployment_target = '10.11'
48-
s.tvos.deployment_target = '9.0'
49-
s.watchos.deployment_target = '2.0'
46+
s.ios.deployment_target = '12.0'
47+
s.osx.deployment_target = '10.13'
48+
s.tvos.deployment_target = '12.0'
49+
s.watchos.deployment_target = '4.0'
50+
s.visionos.deployment_target = '1.0'
5051
s.subspec 'xcprivacy' do |ss|
5152
ss.resource_bundles = {
5253
ss.module_name => 'PrivacyInfo.xcprivacy',

absl/algorithm/container.h

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
#include <cassert>
4545
#include <iterator>
4646
#include <numeric>
47-
#include <random>
4847
#include <type_traits>
4948
#include <unordered_map>
5049
#include <unordered_set>
@@ -76,8 +75,8 @@ using ContainerIter = decltype(begin(std::declval<C&>()));
7675
// An MSVC bug involving template parameter substitution requires us to use
7776
// decltype() here instead of just std::pair.
7877
template <typename C1, typename C2>
79-
using ContainerIterPairType =
80-
decltype(std::make_pair(ContainerIter<C1>(), ContainerIter<C2>()));
78+
using ContainerIterPairType = decltype(std::make_pair(
79+
std::declval<ContainerIter<C1>>(), std::declval<ContainerIter<C2>>()));
8180

8281
template <typename C>
8382
using ContainerDifferenceType = decltype(std::distance(
@@ -847,25 +846,9 @@ template <typename C, typename OutputIterator, typename Distance,
847846
typename UniformRandomBitGenerator>
848847
OutputIterator c_sample(const C& c, OutputIterator result, Distance n,
849848
UniformRandomBitGenerator&& gen) {
850-
#if defined(__cpp_lib_sample) && __cpp_lib_sample >= 201603L
851849
return std::sample(container_algorithm_internal::c_begin(c),
852850
container_algorithm_internal::c_end(c), result, n,
853851
std::forward<UniformRandomBitGenerator>(gen));
854-
#else
855-
// Fall back to a stable selection-sampling implementation.
856-
auto first = container_algorithm_internal::c_begin(c);
857-
Distance unsampled_elements = c_distance(c);
858-
n = (std::min)(n, unsampled_elements);
859-
for (; n != 0; ++first) {
860-
Distance r =
861-
std::uniform_int_distribution<Distance>(0, --unsampled_elements)(gen);
862-
if (r < n) {
863-
*result++ = *first;
864-
--n;
865-
}
866-
}
867-
return result;
868-
#endif
869852
}
870853

871854
//------------------------------------------------------------------------------

0 commit comments

Comments
 (0)