Skip to content

Commit 9b1f959

Browse files
committed
For at least c++14 mode for compiling protobuf stub
1 parent dff5e82 commit 9b1f959

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

test/dune

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
(foreign_stubs
3636
(language cxx)
3737
(names protobuf2json)
38-
(flags (:standard (:include c_flags.sexp))))
38+
;; set std=c++14 after standard and before derived c flags
39+
(flags (:standard "-std=c++14" (:include c_flags.sexp)) ))
3940
(c_library_flags (:standard (:include c_library_flags.sexp)))
4041
)
4142

test/protobuf2json.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ util::TypeResolver* make_resolver(const std::string include, const std::string p
5353
#ifdef USE_FILESYSTEM
5454
for(const auto& p : std::filesystem::directory_iterator(".")) {
5555
if(p.path().extension() == ".proto") {
56-
auto * fd = importer->Import(p.path().filename());
56+
importer->Import(p.path().filename());
5757
}
5858
}
5959
#else
6060
caml_invalid_argument("No protofile specified");
6161
#endif
6262
} else {
63-
auto * fd = importer->Import(proto_file);
63+
importer->Import(proto_file);
6464
}
6565
return util::NewTypeResolverForDescriptorPool("type.googleapis.com", importer->pool());
6666
}

0 commit comments

Comments
 (0)