A (Short) Tour of C++ Modulescpp translation unit object file export module library; library interface unit module library; library implementation library implementation object file import library; program library interface interface object file 7 . 1 export ...; export ...; BMI BMI Barrier→║ Architected→→ modularized library some allinterface.cpp declarations macros compiler options predefined, commandline defaults 4 5 6 7 8 9 module; #includeexport module my.first_module; export import other.module; #include "mod.h" constexpr int beast = 666; export std::vector frob(S); 1 2 3 4 5 6 7 8 9 0 码力 | 62 页 | 4.20 MB | 6 月前3
C++ Modules: Getting Started TodayHello Modules! — File: module.cpp export module my_module; export char const* my_function () { return "Hello Modules!"; } — File: main.cpp #includeimport my_module; int main () { std:: println("{}" }11/50 Exporting things // functions export int getNumber (); // types export class SomeType; // templates export template T combine(T n1 , T n2); export template class MyTemplatedType Exporting things export namespace a { void is_exported (); } namespace a { void is_not_exported (); } namespace a { void will_be_exported_in_b (); } export namespace b { export using a:: will_be_exported_in_b 0 码力 | 65 页 | 1.97 MB | 6 月前3
Conan 2.10 Documentation'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz Decompressing conan_export.tgz zlib/1.2.11: Downloaded recipe revision f1fadf0d3b196dc0332750354ad8ab7b Graph conanfile.txt in form of Conan recipe could look like this: Listing 28: conanfile.py from conan import ConanFile class CompressorRecipe(ConanFile): settings = "os", "compiler", "build_type", "arch" generators make it work for every platform without adding more changes. Listing 31: conanfile.py import os from conan import ConanFile (continues on next page) 4.1. Consuming packages 35 Conan Documentation,0 码力 | 803 页 | 5.02 MB | 11 月前3
Conan 2.9 Documentation'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz Decompressing conan_export.tgz zlib/1.2.11: Downloaded recipe revision f1fadf0d3b196dc0332750354ad8ab7b Graph conanfile.txt in form of Conan recipe could look like this: Listing 28: conanfile.py from conan import ConanFile class CompressorRecipe(ConanFile): settings = "os", "compiler", "build_type", "arch" generators make it work for every platform without adding more changes. Listing 31: conanfile.py import os from conan import ConanFile (continues on next page) 4.1. Consuming packages 35 Conan Documentation,0 码力 | 795 页 | 4.99 MB | 11 月前3
Conan 2.6 Documentation'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz Decompressing conan_export.tgz zlib/1.2.11: Downloaded recipe revision f1fadf0d3b196dc0332750354ad8ab7b Graph conanfile.txt in form of Conan recipe could look like this: Listing 28: conanfile.py from conan import ConanFile class CompressorRecipe(ConanFile): settings = "os", "compiler", "build_type", "arch" generators make it work for every platform without adding more changes. Listing 31: conanfile.py import os from conan import ConanFile (continues on next page) 4.1. Consuming packages 35 Conan Documentation,0 码力 | 777 页 | 4.91 MB | 11 月前3
Conan 2.7 Documentation'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz Decompressing conan_export.tgz zlib/1.2.11: Downloaded recipe revision f1fadf0d3b196dc0332750354ad8ab7b Graph conanfile.txt in form of Conan recipe could look like this: Listing 28: conanfile.py from conan import ConanFile class CompressorRecipe(ConanFile): settings = "os", "compiler", "build_type", "arch" generators make it work for every platform without adding more changes. Listing 31: conanfile.py import os from conan import ConanFile (continues on next page) 4.1. Consuming packages 35 Conan Documentation,0 码力 | 779 页 | 4.93 MB | 11 月前3
Conan 2.8 Documentation'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz Decompressing conan_export.tgz zlib/1.2.11: Downloaded recipe revision f1fadf0d3b196dc0332750354ad8ab7b Graph conanfile.txt in form of Conan recipe could look like this: Listing 28: conanfile.py from conan import ConanFile class CompressorRecipe(ConanFile): settings = "os", "compiler", "build_type", "arch" generators make it work for every platform without adding more changes. Listing 31: conanfile.py import os from conan import ConanFile (continues on next page) 4.1. Consuming packages 35 Conan Documentation,0 码力 | 785 页 | 4.95 MB | 11 月前3
Conda 25.1.x Documentationfile for conda. 18 Chapter 4. Contributors welcome conda, Release 25.1.2.dev1 # Import our GPG public key rpm --import https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc # Add the Anaconda repository your .condarc file: notify_outdated_conda: false Managing environments With conda, you can create, export, list, remove, and update environments that have different versions of Python and/or packages installed --file argument. • Pip accepts a list of Python packages with -r or --requirements. • Conda env will export or create environments based on a file with conda and pip requirements. Setting environment variables0 码力 | 822 页 | 5.20 MB | 8 月前3
Mastering C++ ModulesBill Hoffman, CTO @ Kitware creator of CMake 1 import CMake; // Mastering C++ Modules2 _____________________ GUY CMake / Sandal / Kitware Bill Hoffman3 About Me • 1990-1999 GE research in a Computer Kitware – Lots of development in CMake/ITK/VTK – Mostly management now, finding funding for CMake import CMake; // Mastering C++ ModulesCMake is a Community Effort 4 Brad King, Ben Boeckel, Craig Scott Release-1-0 branch created in 2001 • Since then funding from many projects and outside contributions import CMake; // Mastering C++ ModulesEnough with the Background Let's Talk Modules! 7C++ Named Modules0 码力 | 77 页 | 9.07 MB | 6 月前3
Conda 24.11.x Documentationfile for conda. 18 Chapter 4. Contributors welcome conda, Release 24.11.3.dev2 # Import our GPG public key rpm --import https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc # Add the Anaconda repository your .condarc file: notify_outdated_conda: false Managing environments With conda, you can create, export, list, remove, and update environments that have different versions of Python and/or packages installed --file argument. • Pip accepts a list of Python packages with -r or --requirements. • Conda env will export or create environments based on a file with conda and pip requirements. Setting environment variables0 码力 | 818 页 | 5.21 MB | 8 月前3
共 196 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20













