Fix StringView build

After ff5892c5da added the new StringView,
building fails with GCC 6 due to it apparently failing to properly find
the type for nullptr_t resulting in the following error:

In file included from ../src/common/module.h:49:0,
                 from ../src/common/dwarf_cfi_to_module.h:49,
                 from ../src/common/linux/dump_symbols.cc:59:
../src/common/string_view.h:55:27: error: field 'nullptr_t' has incomplete type 'google_breakpad::StringView'
   StringView(nullptr_t) = delete;
                           ^~~~~~
../src/common/string_view.h:42:7: note: definition of 'class google_breakpad::StringView' is not complete until the closing brace
 class StringView {
       ^~~~~~~~~~

This can be fixed by adding the std:: namespace to nullptr_t.

Change-Id: I00a090d307ebe21d1143eac4a605ff319ce27048
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3201997
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Marvin Scholz 2021-10-04 16:48:15 +02:00 committed by Joshua Peraza
parent cf6246e2ba
commit 0c04944727

View File

@ -52,7 +52,7 @@ class StringView {
StringView() = default; StringView() = default;
// Disallow construct StringView from nullptr. // Disallow construct StringView from nullptr.
StringView(nullptr_t) = delete; StringView(std::nullptr_t) = delete;
// Construct a StringView from a cstring. // Construct a StringView from a cstring.
StringView(const char* str) : data_(str) { StringView(const char* str) : data_(str) {