File tree Expand file tree Collapse file tree 4 files changed +4
-2
lines changed Expand file tree Collapse file tree 4 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11cxx_library (
22 name = "demo-cxx" ,
33 srcs = ["demo.cc" ],
4+ compiler_flags = ["-std=c++14" ],
45 visibility = ["PUBLIC" ],
56 deps = [
67 ":include" ,
Original file line number Diff line number Diff line change 11cc_library (
22 name = "demo-cxx" ,
33 srcs = ["demo.cc" ],
4+ copts = ["-std=c++14" ],
45 visibility = ["//visibility:public" ],
56 deps = [
67 ":include" ,
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ThingC::ThingC(std::string appname) : appname(std::move(appname)) {}
1010ThingC::~ThingC () { std::cout << " done with ThingC" << std::endl; }
1111
1212std::unique_ptr<ThingC> make_demo (rust::Str appname) {
13- return std::unique_ptr <ThingC>(new ThingC ( std::string (appname) ));
13+ return std::make_unique <ThingC>(std::string (appname));
1414}
1515
1616const std::string &get_name (const ThingC &thing) { return thing.appname ; }
Original file line number Diff line number Diff line change 11fn main ( ) {
22 cxx_build:: bridge ( "src/main.rs" )
33 . file ( "../demo-cxx/demo.cc" )
4- . flag_if_supported ( "-std=c++11 " )
4+ . flag_if_supported ( "-std=c++14 " )
55 . compile ( "cxxbridge-demo" ) ;
66
77 println ! ( "cargo:rerun-if-changed=src/main.rs" ) ;
You can’t perform that action at this time.
0 commit comments