这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@anpol
Copy link
Contributor

@anpol anpol commented Nov 12, 2025

Abseil associative containers having keys of a string type provide so-called heterogeneous lookup: they allow either std::string, std::string_view, or absl::Cord values in lookup.

On the other hand, using either of associative containers should not require compiling the cord library unless the use of absl::Cord is explicitly requested.

The solution is to forward-declare absl::Cord and a few functions just to support heterogeneous lookup, make the associative containers use these functions only, and require users of absl::Cord to link with the cord library explicitly.

fixes #1868

Abseil associative containers having keys of a string type provide
so-called heterogeneous lookup: they allow either `std::string`,
`std::string_view`, or `absl::Cord` values in lookup.

On the other hand, using either of associative containers should not
require compiling the cord library unless the use of `absl::Cord` is
explicitly requested.

The solution is to forward-declare `absl::Cord` and a few functions just
to support heterogeneous lookup, make the associative containers use
these functions only, and require users of `absl::Cord` to link with
the cord library explicitly.

fixes abseil#1868
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cord causes slow builds all over project

1 participant