On Sunday, July  6, 2025, at 12:50 AM +0200, Frank Heckenbach wrote:
> Could libabsl be built with ABSL_USES_STD_STRING_VIEW,
> ABSL_OPTION_USE_STD_OPTIONAL, ABSL_OPTION_USE_STD_VARIANT and
> similar settings?

Yes, but it’s not going to happen in trixie. :|

For background, ABSL_USES_STD_STRING_VIEW and friends have been in
Abseil for a while to support projects that are still using C++14 (or
earlier). Happily, Abseil upstream has officially dropped support for
C++14, and the latest release of Abseil no longer even has these
#defines. Unfortunately, trixie was frozen before that release, so
trixie will ship with absl::string_view != std::string_view. forky will
be the first release to have have absl::string_view == std::string_view
everywhere.

I know this is probably not the answer you wanted to hear, and I’m sorry
that RE2’s switch to absl::string_view is creating work for you. I think
the simplest solution right now would be to switch to building Abseil
and RE2 as part of your project rather than using the ones packaged in
trixie; that would let you get the seamless C++17 experience rather than
the static_cast-prone old one. (You should rebuild both Abseil and RE2 –
a from-source Abseil will generally have a different ABI than Abseil in
trixie, so trying to link the trixie RE2 against a from-source Abseil is
likely to result in complex and subtle bugs.)

Benjamin

Reply via email to