From 0c049447270bdf9fee1ebe24ceeeab2f3f49e35a Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Mon, 4 Oct 2021 16:48:15 +0200 Subject: [PATCH] Fix StringView build After ff5892c5da86c50af1951328215a5a3a203a9bb1 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 --- src/common/string_view.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/string_view.h b/src/common/string_view.h index 3c2fc744..3d59ec4e 100644 --- a/src/common/string_view.h +++ b/src/common/string_view.h @@ -52,7 +52,7 @@ class StringView { StringView() = default; // Disallow construct StringView from nullptr. - StringView(nullptr_t) = delete; + StringView(std::nullptr_t) = delete; // Construct a StringView from a cstring. StringView(const char* str) : data_(str) {