abseil / abseil/abseil-cpp

[Bug]: absl/strings/internal/cord_rep_flat.h(42,39): error C2131: expression did not evaluate to a constant

Aberta
#1,554 3 comentários 0 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

### Describe the issue

`cord_rep_flat.h` does not compile with MSVC on Windows due to the `offsetof` macro definition in `stddef.h`:

```
// C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\stddef.h
#if defined _MSC_VER && !defined _CRT_USE_BUILTIN_OFFSETOF
#ifdef __cplusplus
// This one is used in my setup
#define offsetof(s,m) ((::size_t)&reinterpret_cast((((s*)0)->m)))
#else
#define offsetof(s,m) ((size_t)&(((s*)0)->m))
#endif
#else
#define offsetof(s,m) __builtin_offsetof(s,m)
#endif
```

### Steps to reproduce the problem

```cpp
// Anything that transitively includes
#include
```

### What version of Abseil are you using?

`20230125.3` from conancenter

### What operating system and version are you using?

Windows 11

### What compiler and version are you using?

I *think* I'm using Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32824 for x64 but MSBuild is inscrutable.

### What build system are you using?

CMake 3.27.6

### Additional context

_No response_

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.