Skip to content

Commit

Permalink
Update cc crate's C++ standard library API in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 24, 2024
1 parent 2d4b4f8 commit cdc5833
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demo/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fn main() {
cxx_build::bridge("src/main.rs")
.file("src/blobstore.cc")
.flag_if_supported("-std=c++14")
.std("c++14")
.compile("cxxbridge-demo");

println!("cargo:rerun-if-changed=src/main.rs");
Expand Down
4 changes: 2 additions & 2 deletions gen/build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! fn main() {
//! cxx_build::bridge("src/main.rs")
//! .file("src/demo.cc")
//! .flag_if_supported("-std=c++11")
//! .std("c++11")
//! .compile("cxxbridge-demo");
//!
//! println!("cargo:rerun-if-changed=src/main.rs");
Expand Down Expand Up @@ -129,7 +129,7 @@ pub fn bridge(rust_source_file: impl AsRef<Path>) -> Build {
/// let source_files = vec!["src/main.rs", "src/path/to/other.rs"];
/// cxx_build::bridges(source_files)
/// .file("src/demo.cc")
/// .flag_if_supported("-std=c++11")
/// .std("c++11")
/// .compile("cxxbridge-demo");
/// ```
#[must_use]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
//! fn main() {
//! cxx_build::bridge("src/main.rs") // returns a cc::Build
//! .file("src/demo.cc")
//! .flag_if_supported("-std=c++11")
//! .std("c++11")
//! .compile("cxxbridge-demo");
//!
//! println!("cargo:rerun-if-changed=src/main.rs");
Expand Down

0 comments on commit cdc5833

Please sign in to comment.