summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dennis Shen <dzshen@google.com> 2023-10-10 23:55:41 +0000
committer Dennis Shen <dzshen@google.com> 2023-10-11 14:00:48 +0000
commitda07fea7414c7a5b07738fa4884803a9a919955b (patch)
tree9842745ef3d3e8c9e10c66e7a6e1c983aeb93fa6
parent14e0d156fb2bf2223e8b02aff62fe4dbe5b74ba6 (diff)
aconfig: add missing string header to template
Bug: 304338314 Test: atest aconfig.test Change-Id: I97e62ebd9df18d260fd272a8f63a004ba627de9b
-rw-r--r--tools/aconfig/src/codegen_cpp.rs1
-rw-r--r--tools/aconfig/templates/cpp_source_file.template1
2 files changed, 2 insertions, 0 deletions
diff --git a/tools/aconfig/src/codegen_cpp.rs b/tools/aconfig/src/codegen_cpp.rs
index 5eadf2a0e4..cf0abb9523 100644
--- a/tools/aconfig/src/codegen_cpp.rs
+++ b/tools/aconfig/src/codegen_cpp.rs
@@ -365,6 +365,7 @@ bool com_android_aconfig_test_enabled_rw() {
#include "com_android_aconfig_test.h"
#include <server_configurable_flags/get_flags.h>
#include <unordered_map>
+#include <string>
namespace com::android::aconfig::test {
diff --git a/tools/aconfig/templates/cpp_source_file.template b/tools/aconfig/templates/cpp_source_file.template
index c0e7343785..5b71b31770 100644
--- a/tools/aconfig/templates/cpp_source_file.template
+++ b/tools/aconfig/templates/cpp_source_file.template
@@ -4,6 +4,7 @@
{{ endif }}
{{ if for_test }}
#include <unordered_map>
+#include <string>
{{ endif }}
namespace {cpp_namespace} \{