Commit c16d5557 by Abseil Team Committed by Ashley Hedberg

Export of internal Abseil changes.

--
4e043a11b4c10a24e84046827ee16f47e11e35cc by Abseil Team <absl-team@google.com>:

Merge of https://github.com/abseil/abseil-cpp/pull/136

PiperOrigin-RevId: 218197648

--
e61f06e1e601061a443feaa8c5207c52437bd641 by Abseil Team <absl-team@google.com>:

Don't include <iostream> into int128, it's wasteful

Including iostream emits a global constructor for initializing std::cout and
friends, which isn't actually used by this file.

PiperOrigin-RevId: 218156386

--
8a6c82396e4c956be7f285328aec131cb4965f16 by Xiaoyi Zhang <zhangxy@google.com>:

Fix MSVC compiler warnings on discarding return values of functions with 'nodiscard'
attribute.

PiperOrigin-RevId: 217883401

--
abf3e3a0f22bc4070df9dbc9a4ef4d883ed686bf by Tom Manshreck <shreck@google.com>:

Update public README to add new libraries

PiperOrigin-RevId: 217879399

--
43b3b420a4e861711abbfbd497b8f2b3de17ec8c by Abseil Team <absl-team@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 217780963

--
1c8831947ca6a65a63842e6bd5f37a7c102a4e1b by Abseil Team <absl-team@google.com>:

Fix typo in a comment (missing comma in usage example).

PiperOrigin-RevId: 217776645
GitOrigin-RevId: 4e043a11b4c10a24e84046827ee16f47e11e35cc
Change-Id: I8999ae928da7a0030b4ecfd8d13da8522fdd013a
parent 45221ccc
......@@ -62,7 +62,104 @@ function(absl_library)
endif()
endfunction()
#
# CMake function to imitate Bazel's cc_library rule.
#
# Parameters:
# NAME: name of target (see Note)
# HDRS: List of public header files for the library
# SRCS: List of source files for the library
# DEPS: List of other libraries to be linked in to the binary targets
# COPTS: List of private compile options
# DEFINES: List of public defines
# LINKOPTS: List of link options
# PUBLIC: Add this so that this library will be exported under absl:: (see Note).
# TESTONLY: When added, this target will only be built if user passes -DABSL_RUN_TESTS=ON to CMake.
#
# Note:
#
# By default, absl_cc_library will always create a library named absl_internal_${NAME},
# which means other targets can only depend this library as absl_internal_${NAME}, not ${NAME}.
# This is to reduce namespace pollution.
#
# absl_cc_library(
# NAME
# awesome_lib
# HDRS
# "a.h"
# SRCS
# "a.cc"
# )
# absl_cc_library(
# NAME
# fantastic_lib
# SRCS
# "b.cc"
# DEPS
# absl_internal_awesome_lib # not "awesome_lib"!
# )
#
# If PUBLIC is set, absl_cc_library will instead create a target named
# absl_${NAME} and an alias absl::${NAME}.
#
# absl_cc_library(
# NAME
# main_lib
# ...
# PUBLIC
# )
#
# User can then use the library as absl::main_lib (although absl_main_lib is defined too).
#
# TODO: Implement "ALWAYSLINK"
function(absl_cc_library)
cmake_parse_arguments(ABSL_CC_LIB
"DISABLE_INSTALL;PUBLIC;TESTONLY"
"NAME"
"HDRS;SRCS;COPTS;DEFINES;LINKOPTS;DEPS"
${ARGN}
)
if (NOT ABSL_CC_LIB_TESTONLY OR ABSL_RUN_TESTS)
if (ABSL_CC_LIB_PUBLIC)
set(_NAME "absl_${ABSL_CC_LIB_NAME}")
else()
set(_NAME "absl_internal_${ABSL_CC_LIB_NAME}")
endif()
# Check if this is a header-only library
if ("${ABSL_CC_LIB_SRCS}" STREQUAL "")
set(ABSL_CC_LIB_IS_INTERFACE 1)
else()
set(ABSL_CC_LIB_IS_INTERFACE 0)
endif()
if(NOT ABSL_CC_LIB_IS_INTERFACE)
add_library(${_NAME} STATIC "")
target_sources(${_NAME} PRIVATE ${ABSL_CC_LIB_SRCS} ${ABSL_CC_LIB_HDRS})
target_include_directories(${_NAME}
PUBLIC ${ABSL_COMMON_INCLUDE_DIRS})
# TODO(rongjiecomputer): Revisit ABSL_COMPILE_CXXFLAGS when fixing GH#123
target_compile_options(${_NAME}
PRIVATE ${ABSL_COMPILE_CXXFLAGS} ${ABSL_CC_LIB_COPTS})
target_link_libraries(${_NAME}
PUBLIC ${ABSL_CC_LIB_DEPS}
PRIVATE ${ABSL_CC_LIB_LINKOPTS}
)
target_compile_definitions(${_NAME} PUBLIC ${ABSL_CC_LIB_DEFINES})
# Add all Abseil targets to a a folder in the IDE for organization.
set_property(TARGET ${_NAME} PROPERTY FOLDER ${ABSL_IDE_FOLDER})
else()
# Generating header-only library
add_library(${_NAME} INTERFACE)
target_include_directories(${_NAME} INTERFACE ${ABSL_COMMON_INCLUDE_DIRS})
target_link_libraries(${_NAME}
INTERFACE ${ABSL_CC_LIB_DEPS} ${ABSL_CC_LIB_LINKOPTS}
)
target_compile_definitions(${_NAME} INTERFACE ${ABSL_CC_LIB_DEFINES})
endif()
if(ABSL_CC_LIB_PUBLIC)
add_library(absl::${ABSL_CC_LIB_NAME} ALIAS ${_NAME})
endif()
endif()
endfunction()
#
# header only virtual target creation
......
......@@ -63,10 +63,14 @@ Abseil contains the following C++ library components:
<br /> The `algorithm` library contains additions to the C++ `<algorithm>`
library and container-based versions of such algorithms.
* [`container`](absl/container/)
<br /> The `container` library contains additional STL-style containers.
<br /> The `container` library contains additional STL-style containers,
including Abseil's unordered "Swiss table" containers.
* [`debugging`](absl/debugging/)
<br /> The `debugging` library contains code useful for enabling leak
checks. Future updates will add stacktrace and symbolization utilities.
checks, and stacktrace and symbolization utilities.
* [`hash`](absl/hash/)
<br /> The `hash` library contains the hashing framework and default hash
functor implementations for hashable types in Abseil.
* [`memory`](absl/memory/)
<br /> The `memory` library contains C++11-compatible versions of
`std::make_unique()` and related memory management facilities.
......@@ -90,6 +94,8 @@ Abseil contains the following C++ library components:
* [`types`](absl/types/)
<br /> The `types` library contains non-container utility types, like a
C++11-compatible version of the C++17 `std::optional` type.
* [`utility`](absl/utility/)
<br /> The `utility` library contains utility and helper code.
## License
......
......@@ -78,54 +78,44 @@ absl_library(
${BASE_SRC}
PUBLIC_LIBRARIES
absl_dynamic_annotations
absl_spinlock_wait
absl_internal_spinlock_wait
EXPORT_NAME
base
)
# throw delegate library
set(THROW_DELEGATE_SRC "internal/throw_delegate.cc")
absl_library(
TARGET
absl_throw_delegate
SOURCES
${THROW_DELEGATE_SRC}
PUBLIC_LIBRARIES
${THROW_DELEGATE_PUBLIC_LIBRARIES}
PRIVATE_COMPILE_FLAGS
${ABSL_EXCEPTIONS_FLAG}
EXPORT_NAME
absl_cc_library(
NAME
throw_delegate
SRCS
"internal/throw_delegate.cc"
HDRS
"internal/throw_delegate.h"
COPTS
${ABSL_EXCEPTIONS_FLAG}
DEPS
absl::base
)
if(BUILD_TESTING)
# exception-safety testing library
set(EXCEPTION_SAFETY_TESTING_SRC
# exception-safety testing library
absl_cc_library(
NAME
exception_safety_testing
HDRS
"internal/exception_safety_testing.h"
SRCS
"internal/exception_safety_testing.cc"
)
set(EXCEPTION_SAFETY_TESTING_PUBLIC_LIBRARIES
${ABSL_TEST_COMMON_LIBRARIES}
COPTS
${ABSL_EXCEPTIONS_FLAG}
DEPS
absl::base
absl::memory
absl::meta
absl::strings
absl::optional
gtest
)
absl_library(
TARGET
absl_base_internal_exception_safety_testing
SOURCES
${EXCEPTION_SAFETY_TESTING_SRC}
PUBLIC_LIBRARIES
${EXCEPTION_SAFETY_TESTING_PUBLIC_LIBRARIES}
PRIVATE_COMPILE_FLAGS
${ABSL_EXCEPTIONS_FLAG}
TESTONLY
)
endif()
# dynamic_annotations library
......@@ -138,29 +128,25 @@ absl_library(
${DYNAMIC_ANNOTATIONS_SRC}
)
# spinlock_wait library
set(SPINLOCK_WAIT_SRC "internal/spinlock_wait.cc")
absl_library(
TARGET
absl_spinlock_wait
SOURCES
${SPINLOCK_WAIT_SRC}
)
# malloc_internal library
list(APPEND MALLOC_INTERNAL_SRC
"internal/low_level_alloc.cc"
absl_cc_library(
NAME
spinlock_wait
SRCS
"internal/spinlock_wait.cc"
HDRS
"internal/scheduling_mode.h"
"internal/spinlock_wait.h"
)
absl_library(
TARGET
absl_malloc_internal
SOURCES
${MALLOC_INTERNAL_SRC}
PUBLIC_LIBRARIES
absl_cc_library(
NAME
malloc_internal
SRCS
"internal/low_level_alloc.cc"
HDRS
"internal/direct_mmap.h"
"internal/low_level_alloc.h"
DEPS
absl_dynamic_annotations
)
......@@ -211,7 +197,7 @@ absl_test(
# test absl_throw_delegate_test
set(THROW_DELEGATE_TEST_SRC "throw_delegate_test.cc")
set(THROW_DELEGATE_TEST_PUBLIC_LIBRARIES absl::base absl_throw_delegate)
set(THROW_DELEGATE_TEST_PUBLIC_LIBRARIES absl::base absl_internal_throw_delegate)
absl_test(
TARGET
......@@ -368,7 +354,7 @@ absl_test(
set(EXCEPTION_SAFETY_TESTING_TEST_SRC "exception_safety_testing_test.cc")
set(EXCEPTION_SAFETY_TESTING_TEST_PUBLIC_LIBRARIES
absl::base
absl_base_internal_exception_safety_testing
absl_internal_exception_safety_testing
absl::memory
absl::meta
absl::strings
......
......@@ -48,11 +48,9 @@ list(APPEND CONTAINER_INTERNAL_HEADERS
)
absl_library(
absl_header_library(
TARGET
absl_container
SOURCES
"internal/raw_hash_set.cc"
EXPORT_NAME
container
)
......@@ -82,7 +80,7 @@ absl_library(
# test fixed_array_test
set(FIXED_ARRAY_TEST_SRC "fixed_array_test.cc")
set(FIXED_ARRAY_TEST_PUBLIC_LIBRARIES absl::base absl_throw_delegate test_instance_tracker_lib)
set(FIXED_ARRAY_TEST_PUBLIC_LIBRARIES absl::base absl_internal_throw_delegate test_instance_tracker_lib)
absl_test(
TARGET
......@@ -111,7 +109,7 @@ absl_test(
set(FIXED_ARRAY_EXCEPTION_SAFETY_TEST_SRC "fixed_array_exception_safety_test.cc")
set(FIXED_ARRAY_EXCEPTION_SAFETY_TEST_PUBLIC_LIBRARIES
absl::container
absl_base_internal_exception_safety_testing
absl_internal_exception_safety_testing
)
absl_test(
......@@ -128,7 +126,7 @@ absl_test(
# test inlined_vector_test
set(INLINED_VECTOR_TEST_SRC "inlined_vector_test.cc")
set(INLINED_VECTOR_TEST_PUBLIC_LIBRARIES absl::base absl_throw_delegate test_instance_tracker_lib)
set(INLINED_VECTOR_TEST_PUBLIC_LIBRARIES absl::base absl_internal_throw_delegate test_instance_tracker_lib)
absl_test(
TARGET
......@@ -153,7 +151,7 @@ absl_test(
# test test_instance_tracker_test
set(TEST_INSTANCE_TRACKER_TEST_SRC "internal/test_instance_tracker_test.cc")
set(TEST_INSTANCE_TRACKER_TEST_PUBLIC_LIBRARIES absl::base absl_throw_delegate test_instance_tracker_lib)
set(TEST_INSTANCE_TRACKER_TEST_PUBLIC_LIBRARIES absl::base absl_internal_throw_delegate test_instance_tracker_lib)
absl_test(
......@@ -164,13 +162,3 @@ absl_test(
PUBLIC_LIBRARIES
${TEST_INSTANCE_TRACKER_TEST_PUBLIC_LIBRARIES}
)
absl_test(
TARGET
raw_hash_set_test
SOURCES
"internal/raw_hash_set_test.cc"
PUBLIC_LIBRARIES
absl::base absl::hash absl_throw_delegate test_instance_tracker_lib
)
......@@ -85,7 +85,7 @@ absl_library(
${SYMBOLIZE_SRC}
PUBLIC_LIBRARIES
absl::base
absl_malloc_internal
absl_internal_malloc_internal
EXPORT_NAME
symbolize
)
......
......@@ -53,7 +53,7 @@ absl_test(
set(MEMORY_EXCEPTION_SAFETY_TEST_SRC "memory_exception_safety_test.cc")
set(MEMORY_EXCEPTION_SAFETY_TEST_PUBLIC_LIBRARIES
absl::memory
absl_base_internal_exception_safety_testing
absl_internal_exception_safety_testing
)
absl_test(
......@@ -66,6 +66,3 @@ absl_test(
PRIVATE_COMPILE_FLAGS
${ABSL_EXCEPTIONS_FLAG}
)
......@@ -145,7 +145,7 @@ TEST(Make_UniqueTest, NotAmbiguousWithStdMakeUnique) {
explicit TakesStdType(const std::vector<int> &vec) {}
};
using absl::make_unique;
make_unique<TakesStdType>(std::vector<int>());
(void)make_unique<TakesStdType>(std::vector<int>());
}
#if 0
......
......@@ -17,7 +17,7 @@
#include <stddef.h>
#include <cassert>
#include <iomanip>
#include <iostream> // NOLINT(readability/streams)
#include <ostream> // NOLINT(readability/streams)
#include <sstream>
#include <string>
#include <type_traits>
......
......@@ -67,7 +67,7 @@ list(APPEND STRINGS_SRC
${STRINGS_PUBLIC_HEADERS}
${STRINGS_INTERNAL_HEADERS}
)
set(STRINGS_PUBLIC_LIBRARIES absl::base absl_throw_delegate)
set(STRINGS_PUBLIC_LIBRARIES absl::base absl_internal_throw_delegate)
absl_library(
TARGET
......@@ -207,7 +207,7 @@ absl_test(
# test string_view_test
set(STRING_VIEW_TEST_SRC "string_view_test.cc")
set(STRING_VIEW_TEST_PUBLIC_LIBRARIES absl::strings absl_throw_delegate absl::base)
set(STRING_VIEW_TEST_PUBLIC_LIBRARIES absl::strings absl_internal_throw_delegate absl::base)
absl_test(
TARGET
......@@ -235,7 +235,7 @@ absl_test(
# test str_replace_test
set(STR_REPLACE_TEST_SRC "str_replace_test.cc")
set(STR_REPLACE_TEST_PUBLIC_LIBRARIES absl::strings absl::base absl_throw_delegate)
set(STR_REPLACE_TEST_PUBLIC_LIBRARIES absl::strings absl::base absl_internal_throw_delegate)
absl_test(
TARGET
......@@ -249,7 +249,7 @@ absl_test(
# test str_split_test
set(STR_SPLIT_TEST_SRC "str_split_test.cc")
set(STR_SPLIT_TEST_PUBLIC_LIBRARIES absl::strings absl::base absl_throw_delegate)
set(STR_SPLIT_TEST_PUBLIC_LIBRARIES absl::strings absl::base absl_internal_throw_delegate)
absl_test(
TARGET
......@@ -460,4 +460,3 @@ absl_test(
absl::base
)
......@@ -151,7 +151,7 @@ void BM_find_string_view_len_one(benchmark::State& state) {
std::string haystack(state.range(0), '0');
absl::string_view s(haystack);
for (auto _ : state) {
s.find("x"); // not present; length 1
benchmark::DoNotOptimize(s.find("x")); // not present; length 1
}
}
BENCHMARK(BM_find_string_view_len_one)->Range(1, 1 << 20);
......@@ -160,7 +160,7 @@ void BM_find_string_view_len_two(benchmark::State& state) {
std::string haystack(state.range(0), '0');
absl::string_view s(haystack);
for (auto _ : state) {
s.find("xx"); // not present; length 2
benchmark::DoNotOptimize(s.find("xx")); // not present; length 2
}
}
BENCHMARK(BM_find_string_view_len_two)->Range(1, 1 << 20);
......@@ -169,7 +169,7 @@ void BM_find_one_char(benchmark::State& state) {
std::string haystack(state.range(0), '0');
absl::string_view s(haystack);
for (auto _ : state) {
s.find('x'); // not present
benchmark::DoNotOptimize(s.find('x')); // not present
}
}
BENCHMARK(BM_find_one_char)->Range(1, 1 << 20);
......@@ -178,7 +178,7 @@ void BM_rfind_one_char(benchmark::State& state) {
std::string haystack(state.range(0), '0');
absl::string_view s(haystack);
for (auto _ : state) {
s.rfind('x'); // not present
benchmark::DoNotOptimize(s.rfind('x')); // not present
}
}
BENCHMARK(BM_rfind_one_char)->Range(1, 1 << 20);
......@@ -193,7 +193,7 @@ void BM_worst_case_find_first_of(benchmark::State& state, int haystack_len) {
absl::string_view s(haystack);
for (auto _ : state) {
s.find_first_of(needle);
benchmark::DoNotOptimize(s.find_first_of(needle));
}
}
......
......@@ -678,9 +678,9 @@ TEST(StringViewTest, STL2Substr) {
EXPECT_EQ(a.substr(23, absl::string_view::npos), c);
// throw exception
#ifdef ABSL_HAVE_EXCEPTIONS
EXPECT_THROW(a.substr(99, 2), std::out_of_range);
EXPECT_THROW((void)a.substr(99, 2), std::out_of_range);
#else
EXPECT_DEATH(a.substr(99, 2), "absl::string_view::substr");
EXPECT_DEATH((void)a.substr(99, 2), "absl::string_view::substr");
#endif
}
......
......@@ -342,7 +342,7 @@ using CivilYear =
//
// absl::CivilSecond cs = ...;
// absl::civil_year_t y = cs.year();
// cs = absl::CivilSecond(y, 1, 1, 0, 0 0); // CivilSecond(CivilYear(cs))
// cs = absl::CivilSecond(y, 1, 1, 0, 0, 0); // CivilSecond(CivilYear(cs))
//
using civil_year_t = time_internal::cctz::year_t;
......
/* Layout and location of TZif files. */
#ifndef TZFILE_H
#define TZFILE_H
......
# tz zone descriptions
# tzdb timezone descriptions
#
# This file is in the public domain.
#
# From Paul Eggert (2017-10-01):
# This file contains a table where each row stands for a zone where
# civil time stamps have agreed since 1970. Columns are separated by
# From Paul Eggert (2018-06-27):
# This file contains a table where each row stands for a timezone where
# civil timestamps have agreed since 1970. Columns are separated by
# a single tab. Lines beginning with '#' are comments. All text uses
# UTF-8 encoding. The columns of the table are as follows:
#
# 1. The countries that overlap the zone, as a comma-separated list
# 1. The countries that overlap the timezone, as a comma-separated list
# of ISO 3166 2-character country codes. See the file 'iso3166.tab'.
# 2. Latitude and longitude of the zone's principal location
# 2. Latitude and longitude of the timezone's principal location
# in ISO 6709 sign-degrees-minutes-seconds format,
# either ±DDMM±DDDMM or ±DDMMSS±DDDMMSS,
# first latitude (+ is north), then longitude (+ is east).
# 3. Zone name used in value of TZ environment variable.
# Please see the theory.html file for how zone names are chosen.
# If multiple zones overlap a country, each has a row in the
# 3. Timezone name used in value of TZ environment variable.
# Please see the theory.html file for how these names are chosen.
# If multiple timezones overlap a country, each has a row in the
# table, with each column 1 containing the country code.
# 4. Comments; present if and only if a country has multiple zones.
# 4. Comments; present if and only if a country has multiple timezones.
#
# If a zone covers multiple countries, the most-populous city is used,
# If a timezone covers multiple countries, the most-populous city is used,
# and that country is listed first in column 1; any other countries
# are listed alphabetically by country code. The table is sorted
# first by country code, then (if possible) by an order within the
# country that (1) makes some geographical sense, and (2) puts the
# most populous zones first, where that does not contradict (1).
# most populous timezones first, where that does not contradict (1).
#
# This table is intended as an aid for users, to help them select time
# zone data entries appropriate for their practical needs. It is not
# intended to take or endorse any position on legal or territorial claims.
# This table is intended as an aid for users, to help them select timezones
# appropriate for their practical needs. It is not intended to take or
# endorse any position on legal or territorial claims.
#
#country-
#codes coordinates TZ comments
......@@ -231,7 +231,7 @@ MM +1647+09610 Asia/Yangon
MN +4755+10653 Asia/Ulaanbaatar Mongolia (most areas)
MN +4801+09139 Asia/Hovd Bayan-Ölgii, Govi-Altai, Hovd, Uvs, Zavkhan
MN +4804+11430 Asia/Choibalsan Dornod, Sükhbaatar
MO +2214+11335 Asia/Macau
MO +221150+1133230 Asia/Macau
MQ +1436-06105 America/Martinique
MT +3554+01431 Europe/Malta
MU -2010+05730 Indian/Mauritius
......
......@@ -123,7 +123,7 @@ absl_library(
# test any_test
set(ANY_TEST_SRC "any_test.cc")
set(ANY_TEST_PUBLIC_LIBRARIES absl::base absl::throw_delegate absl::any absl::bad_any_cast test_instance_tracker_lib)
set(ANY_TEST_PUBLIC_LIBRARIES absl::base absl_internal_throw_delegate absl::any absl::bad_any_cast test_instance_tracker_lib)
absl_test(
TARGET
......@@ -152,7 +152,7 @@ set(ANY_EXCEPTION_SAFETY_TEST_SRC "any_exception_safety_test.cc")
set(ANY_EXCEPTION_SAFETY_TEST_PUBLIC_LIBRARIES
absl::any
absl::base
absl_base_internal_exception_safety_testing
absl_internal_exception_safety_testing
)
absl_test(
......@@ -169,7 +169,7 @@ absl_test(
# test span_test
set(SPAN_TEST_SRC "span_test.cc")
set(SPAN_TEST_PUBLIC_LIBRARIES absl::base absl::strings absl::throw_delegate absl::span test_instance_tracker_lib)
set(SPAN_TEST_PUBLIC_LIBRARIES absl::base absl::strings absl_internal_throw_delegate absl::span test_instance_tracker_lib)
absl_test(
TARGET
......@@ -197,7 +197,7 @@ absl_test(
# test optional_test
set(OPTIONAL_TEST_SRC "optional_test.cc")
set(OPTIONAL_TEST_PUBLIC_LIBRARIES absl::base absl::throw_delegate absl::optional absl_bad_optional_access)
set(OPTIONAL_TEST_PUBLIC_LIBRARIES absl::base absl_internal_throw_delegate absl::optional absl_bad_optional_access)
absl_test(
TARGET
......@@ -213,7 +213,7 @@ absl_test(
set(OPTIONAL_EXCEPTION_SAFETY_TEST_SRC "optional_exception_safety_test.cc")
set(OPTIONAL_EXCEPTION_SAFETY_TEST_PUBLIC_LIBRARIES
absl::optional
absl_base_internal_exception_safety_testing
absl_internal_exception_safety_testing
)
absl_test(
......
......@@ -1042,9 +1042,9 @@ TEST(optionalTest, Value) {
// test exception throw on value()
absl::optional<int> empty;
#ifdef ABSL_HAVE_EXCEPTIONS
EXPECT_THROW(empty.value(), absl::bad_optional_access);
EXPECT_THROW((void)empty.value(), absl::bad_optional_access);
#else
EXPECT_DEATH(empty.value(), "Bad optional access");
EXPECT_DEATH((void)empty.value(), "Bad optional access");
#endif
// test constexpr value()
......
......@@ -52,7 +52,7 @@
#endif // ABSL_HAVE_EXCEPTIONS
#define ABSL_VARIANT_TEST_EXPECT_BAD_VARIANT_ACCESS(...) \
ABSL_VARIANT_TEST_EXPECT_FAIL((__VA_ARGS__), absl::bad_variant_access, \
ABSL_VARIANT_TEST_EXPECT_FAIL((void)(__VA_ARGS__), absl::bad_variant_access, \
"Bad variant access")
struct Hashable {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment