Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 11 additions & 25 deletions CMake/AbseilDll.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set(ABSL_INTERNAL_DLL_FILES
"base/config.h"
"base/const_init.h"
"base/dynamic_annotations.h"
"base/fast_type_id.h"
"base/internal/atomic_hook.h"
"base/internal/cycleclock.cc"
"base/internal/cycleclock.h"
Expand All @@ -18,15 +19,13 @@ set(ABSL_INTERNAL_DLL_FILES
"base/internal/dynamic_annotations.h"
"base/internal/endian.h"
"base/internal/errno_saver.h"
"base/internal/fast_type_id.h"
"base/internal/hide_ptr.h"
"base/internal/identity.h"
"base/internal/invoke.h"
"base/internal/inline_variable.h"
"base/internal/iterator_traits.h"
"base/internal/low_level_alloc.cc"
"base/internal/low_level_alloc.h"
"base/internal/low_level_scheduling.h"
"base/internal/nullability_impl.h"
"base/internal/nullability_deprecated.h"
"base/internal/per_thread_tls.h"
"base/internal/poison.cc"
"base/internal/poison.h"
Expand Down Expand Up @@ -83,6 +82,7 @@ set(ABSL_INTERNAL_DLL_FILES
"container/internal/container_memory.h"
"container/internal/hash_function_defaults.h"
"container/internal/hash_policy_traits.h"
"container/internal/hashtable_control_bytes.h"
"container/internal/hashtable_debug.h"
"container/internal/hashtable_debug_hooks.h"
"container/internal/hashtablez_sampler.cc"
Expand All @@ -94,6 +94,7 @@ set(ABSL_INTERNAL_DLL_FILES
"container/internal/raw_hash_map.h"
"container/internal/raw_hash_set.cc"
"container/internal/raw_hash_set.h"
"container/internal/raw_hash_set_resize_impl.h"
"container/internal/tracked.h"
"container/node_hash_map.h"
"container/node_hash_set.h"
Expand Down Expand Up @@ -126,6 +127,7 @@ set(ABSL_INTERNAL_DLL_FILES
"debugging/symbolize.h"
"debugging/internal/address_is_readable.cc"
"debugging/internal/address_is_readable.h"
"debugging/internal/addresses.h"
"debugging/internal/bounded_utf8_length_sequence.h"
"debugging/internal/decode_rust_punycode.cc"
"debugging/internal/decode_rust_punycode.h"
Expand Down Expand Up @@ -160,6 +162,7 @@ set(ABSL_INTERNAL_DLL_FILES
"hash/internal/spy_hash_state.h"
"hash/internal/low_level_hash.h"
"hash/internal/low_level_hash.cc"
"hash/internal/weakly_mixed_integer.h"
"log/absl_check.h"
"log/absl_log.h"
"log/absl_vlog_is_on.h"
Expand Down Expand Up @@ -201,7 +204,6 @@ set(ABSL_INTERNAL_DLL_FILES
"log/initialize.cc"
"log/initialize.h"
"log/log.h"
"log/log_entry.cc"
"log/log_entry.h"
"log/log_sink.cc"
"log/log_sink.h"
Expand Down Expand Up @@ -238,8 +240,8 @@ set(ABSL_INTERNAL_DLL_FILES
"random/internal/nonsecure_base.h"
"random/internal/pcg_engine.h"
"random/internal/platform.h"
"random/internal/pool_urbg.cc"
"random/internal/pool_urbg.h"
"random/internal/entropy_pool.cc"
"random/internal/entropy_pool.h"
"random/internal/randen.cc"
"random/internal/randen.h"
"random/internal/randen_detect.cc"
Expand Down Expand Up @@ -286,7 +288,6 @@ set(ABSL_INTERNAL_DLL_FILES
"strings/cord.h"
"strings/cord_analysis.cc"
"strings/cord_analysis.h"
"strings/cord_buffer.cc"
"strings/cord_buffer.h"
"strings/escaping.cc"
"strings/escaping.h"
Expand Down Expand Up @@ -432,20 +433,11 @@ set(ABSL_INTERNAL_DLL_FILES
"time/internal/cctz/src/tzfile.h"
"time/internal/cctz/src/zone_info_source.cc"
"types/any.h"
"types/bad_any_cast.cc"
"types/bad_any_cast.h"
"types/bad_optional_access.cc"
"types/bad_optional_access.h"
"types/bad_variant_access.cc"
"types/bad_variant_access.h"
"types/compare.h"
"types/internal/variant.h"
"types/optional.h"
"types/internal/optional.h"
"types/span.h"
"types/internal/span.h"
"types/variant.h"
"utility/internal/if_constexpr.h"
"utility/utility.h"
"debugging/leak_check.cc"
)
Expand Down Expand Up @@ -496,10 +488,6 @@ set(ABSL_INTERNAL_DLL_TARGETS
"any"
"any_invocable"
"atomic_hook"
"bad_any_cast"
"bad_any_cast_impl"
"bad_optional_access"
"bad_variant_access"
"base"
"base_internal"
"bind_front"
Expand Down Expand Up @@ -731,10 +719,8 @@ int main() { return 0; }

if(ABSL_INTERNAL_AT_LEAST_CXX20)
set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_20)
elseif(ABSL_INTERNAL_AT_LEAST_CXX17)
set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_17)
else()
set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_14)
set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_17)
endif()

function(absl_internal_dll_contains)
Expand Down Expand Up @@ -899,7 +885,7 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
)

if(ABSL_PROPAGATE_CXX_STD)
# Abseil libraries require C++14 as the current minimum standard. When
# Abseil libraries require C++17 as the current minimum standard. When
# compiled with a higher minimum (either because it is the compiler's
# default or explicitly requested), then Abseil requires that standard.
target_compile_features(${_dll} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE})
Expand Down
6 changes: 3 additions & 3 deletions CMake/AbseilHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
endif()

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

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

if(ABSL_PROPAGATE_CXX_STD)
# Abseil libraries require C++14 as the current minimum standard.
# Abseil libraries require C++17 as the current minimum standard.
# Top-level application CMake projects should ensure a consistent C++
# standard for all compiled sources by setting CMAKE_CXX_STANDARD.
target_compile_features(${_NAME} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE})
Expand Down
4 changes: 2 additions & 2 deletions CMake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ cmake_minimum_required(VERSION 3.16)
project(my_app_project)

# Pick the C++ standard to compile with.
# Abseil currently supports C++14, C++17, and C++20.
set(CMAKE_CXX_STANDARD 14)
# Abseil currently supports C++17 and C++20.
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_subdirectory(abseil-cpp)
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ if (POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
endif (POLICY CMP0141)

project(absl LANGUAGES CXX VERSION 20250127)
set(ABSL_SOVERSION "2501.0.0")
project(absl LANGUAGES CXX VERSION 20250512)
set(ABSL_SOVERSION "2505.0.0")
include(CTest)

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

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

option(ABSL_USE_SYSTEM_INCLUDES
Expand Down
13 changes: 5 additions & 8 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

module(
name = "abseil-cpp",
version = "20250127.1",
version = "20250512.1",
compatibility_level = 1,
)

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

# Only direct dependencies need to be listed below.
# Please keep the versions in sync with the versions in the WORKSPACE file.

bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "platforms", version = "0.0.11")

bazel_dep(
name = "google_benchmark",
version = "1.8.5",
version = "1.9.2",
dev_dependency = True,
)

# Note: Googletest is NOT a dev_dependency. Some Abseil test utilities
# intended to be used by Abseil users depend on GoogleTest.
bazel_dep(
name = "googletest",
version = "1.15.2",
version = "1.17.0",
)
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Abseil - C++ Common Libraries

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

## Table of Contents
Expand Down Expand Up @@ -99,24 +99,23 @@ Abseil contains the following C++ library components:
<br /> The `memory` library contains memory management facilities that augment
C++'s `<memory>` library.
* [`meta`](absl/meta/)
<br /> The `meta` library contains compatible versions of type checks
available within C++14 and C++17 versions of the C++ `<type_traits>` library.
<br /> The `meta` library contains type checks
similar to those available in the C++ `<type_traits>` library.
* [`numeric`](absl/numeric/)
<br /> The `numeric` library contains 128-bit integer types as well as
implementations of C++20's bitwise math functions.
* [`profiling`](absl/profiling/)
<br /> The `profiling` library contains utility code for profiling C++
entities. It is currently a private dependency of other Abseil libraries.
* [`random`](absl/random/)
<br /> The `random` library contains functions for generating psuedorandom
<br /> The `random` library contains functions for generating pseudorandom
values.
* [`status`](absl/status/)
<br /> The `status` library contains abstractions for error handling,
specifically `absl::Status` and `absl::StatusOr<T>`.
* [`strings`](absl/strings/)
<br /> The `strings` library contains a variety of strings routines and
utilities, including a C++14-compatible version of the C++17
`std::string_view` type.
utilities.
* [`synchronization`](absl/synchronization/)
<br /> The `synchronization` library contains concurrency primitives (Abseil's
`absl::Mutex` class, an alternative to `std::mutex`) and a variety of
Expand All @@ -126,8 +125,7 @@ Abseil contains the following C++ library components:
points in time, durations of time, and formatting and parsing time within
time zones.
* [`types`](absl/types/)
<br /> The `types` library contains non-container utility types, like a
C++14-compatible version of the C++17 `std::optional` type.
<br /> The `types` library contains non-container utility types.
* [`utility`](absl/utility/)
<br /> The `utility` library contains utility and helper code.

Expand Down
9 changes: 5 additions & 4 deletions absl/abseil.podspec.gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@
'USE_HEADERMAP' => 'NO',
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
}
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.11'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'
s.ios.deployment_target = '12.0'
s.osx.deployment_target = '10.13'
s.tvos.deployment_target = '12.0'
s.watchos.deployment_target = '4.0'
s.visionos.deployment_target = '1.0'
s.subspec 'xcprivacy' do |ss|
ss.resource_bundles = {
ss.module_name => 'PrivacyInfo.xcprivacy',
Expand Down
21 changes: 2 additions & 19 deletions absl/algorithm/container.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <cassert>
#include <iterator>
#include <numeric>
#include <random>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
Expand Down Expand Up @@ -76,8 +75,8 @@ using ContainerIter = decltype(begin(std::declval<C&>()));
// An MSVC bug involving template parameter substitution requires us to use
// decltype() here instead of just std::pair.
template <typename C1, typename C2>
using ContainerIterPairType =
decltype(std::make_pair(ContainerIter<C1>(), ContainerIter<C2>()));
using ContainerIterPairType = decltype(std::make_pair(
std::declval<ContainerIter<C1>>(), std::declval<ContainerIter<C2>>()));

template <typename C>
using ContainerDifferenceType = decltype(std::distance(
Expand Down Expand Up @@ -847,25 +846,9 @@ template <typename C, typename OutputIterator, typename Distance,
typename UniformRandomBitGenerator>
OutputIterator c_sample(const C& c, OutputIterator result, Distance n,
UniformRandomBitGenerator&& gen) {
#if defined(__cpp_lib_sample) && __cpp_lib_sample >= 201603L
return std::sample(container_algorithm_internal::c_begin(c),
container_algorithm_internal::c_end(c), result, n,
std::forward<UniformRandomBitGenerator>(gen));
#else
// Fall back to a stable selection-sampling implementation.
auto first = container_algorithm_internal::c_begin(c);
Distance unsampled_elements = c_distance(c);
n = (std::min)(n, unsampled_elements);
for (; n != 0; ++first) {
Distance r =
std::uniform_int_distribution<Distance>(0, --unsampled_elements)(gen);
if (r < n) {
*result++ = *first;
--n;
}
}
return result;
#endif
}

//------------------------------------------------------------------------------
Expand Down
Loading