abseil / abseil/abseil-cpp

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

Aberta
#1,280 1 comentário 2 reações 0 responsáveis Ver no GitHub
Linguagem predominante
C++
Estrelas
18.1k
Forks
3.2k
Merge médio
20h 36min
PRs com merge (30d)
1

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.