diff options
| author | Christian Blichmann <cblichmann@google.com> | 2022-09-30 09:20:11 +0200 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2022-09-30 07:07:09 -0400 |
| commit | 727d2be6872c878b5ed49b8dd33c23a6543826f6 (patch) | |
| tree | d96dff05fefcc3da5523addeb47b50ca83091199 /binaryview.cpp | |
| parent | e51abf509d7040aac768e183a47c966613b67bb7 (diff) | |
Avoid referring to `std::vector<T>` members when `T` is incomplete.
This is [not legal](https://timsong-cpp.github.io/cppwp/n4868/vector#overview-4)
according to the C++ standard, and causes build errors in particular in C++20
mode. Fix it by defining the vector's type before using the vector.
This is a particular problem for C++20 because the compiler now generates code
for `std::vector` members earlier, due to changes to which functions are
`constexpr` in C++20. So code that was already illegal is now detected as such
by the compiler, causing errors in the vector header about the use of incomplete
types.
This was found during an internal #Cleanup at Google. No functional changes.
Diffstat (limited to 'binaryview.cpp')
0 files changed, 0 insertions, 0 deletions
