summaryrefslogtreecommitdiff
path: root/binaryviewtype.cpp
diff options
context:
space:
mode:
authorChristian Blichmann <cblichmann@google.com>2022-09-30 09:20:11 +0200
committerPeter LaFosse <peter@vector35.com>2022-09-30 07:07:09 -0400
commit727d2be6872c878b5ed49b8dd33c23a6543826f6 (patch)
treed96dff05fefcc3da5523addeb47b50ca83091199 /binaryviewtype.cpp
parente51abf509d7040aac768e183a47c966613b67bb7 (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 'binaryviewtype.cpp')
0 files changed, 0 insertions, 0 deletions