abseil / abseil/abseil-cpp

Provide ABI-option for differences between C++17, C++20 & C++23

未关闭
#1,280 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
18.1k
派生
3.2k
平均合并
20 小时 36 分钟
30 天内合并 PR
1

描述

From #1127:
1) Is there a plan to document the various places in which the Abseil ABI differs between C++17 and C++20?
2) is there a plan to add a flag in `options.h` so that downstream packagers can force using the C++17 ABI? For now the [absl::bind_front implementation](https://github.com/abseil/abseil-cpp/blob/master/absl/functional/bind_front.h#L178) doesn't seem to provide any such mechanism.

_Originally posted by @pitrou in https://github.com/abseil/abseil-cpp/issues/1127#issuecomment-1242728025_

Additional selection of comments from that discussion:

> @derekmauro: The return type of `absl::bind_front` and `std::bind_front` is deliberately unspecified. I would like to see an example of code that somehow managed to use the return type in its ABI where the correct answer isn't using `std::function`, `absl::FunctionRef`, or `absl::AnyInvocable` instead.

> @coryan: Assuming C++ >= 17: https://godbolt.org/z/jhhWc8W7b
>
> Of course there are other ways to write this code that does not depend on a stable ABI, but this is not perverse code either.

PS. Same goes for other potential ABI-relevant differences between compiling abseil with C++17 vs. C++20.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。