Custom Views for the Rest of Us49 50 [[nodiscard]] inner_iterator operator++(int) 51 { 52 auto tmp = *this; 53 ++(*this); 54 return tmp; 55 } 56 57 [[nodiscard]] bool operator==(inner_iterator return return tmp; tmp; } } 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 [[nodiscard]] bool operator==(inner_iterator const& rhs) const 58 correct_inner_if_needed(); 47 return *this; 48 } 49 50 51 51 { 52 auto tmp = *this; 53 ++(*this); 54 return tmp; 55 } 56 57 [[nodiscard]] bool operator==(inner_iterator0 码力 | 187 页 | 13.25 MB | 6 月前3
Conan 2.1 Documentationpackage(self): cmake = CMake(self) cmake.install() (continues on next page) 4.2. Creating packages 53 Conan Documentation, Release 2.1.0 (continued from previous page) def package_info(self): self package_info() method. Let’s have a look at the package_info() method of our hello/1.0 Conan package: Listing 53: conanfile.py ... class helloRecipe(ConanFile): name = "hello" version = "1.0" ... def package_info(self): 2ce8b28117dee53 hello/0.1: RUN: git fetch origin --dry-run --depth=1␣ ˓→cb7815a58529130b49da952362ce8b28117dee53 hello/0.1: WARN: Current commit cb7815a58529130b49da952362ce8b28117dee53 doesn't exist␣0 码力 | 694 页 | 4.13 MB | 1 年前3
C++26 Previewopt_int opt{26}; 9 for (const auto& i : opt) { 10 std::print("executed: opt = {}\n", i); 11 } 12 53turns optional into range similar to single_view P3168 Give std::optional Range Support https://github views::iota(0); auto fifties = ints | views::slice(50, 60); println("{} ", fifties); // prints [50, 51, 52, 53, 54, 55, 56, 57, 58, 59] 1 2 3 66in LEWG slice(M, N) is equivalent to views::drop(M) | views::take(N // prints [50, 51, 52, 53, 54, 55, 56, 57, 58, 59] 1 2 3 auto ints = views::iota(0); auto fifties = ints | views::slice(50, 60); println("{} ", fifties); // prints [50, 51, 52, 53, 54, 55, 56, 57, 58,0 码力 | 118 页 | 2.02 MB | 6 月前3
Conan 2.3 Documentationpackage(self): cmake = CMake(self) cmake.install() (continues on next page) 4.2. Creating packages 53 Conan Documentation, Release 2.3.2 (continued from previous page) def package_info(self): self package_info() method. Let’s have a look at the package_info() method of our hello/1.0 Conan package: Listing 53: conanfile.py ... class helloRecipe(ConanFile): name = "hello" version = "1.0" ... def package_info(self): 2ce8b28117dee53 hello/0.1: RUN: git fetch origin --dry-run --depth=1␣ ˓→cb7815a58529130b49da952362ce8b28117dee53 hello/0.1: WARN: Current commit cb7815a58529130b49da952362ce8b28117dee53 doesn't exist␣0 码力 | 748 页 | 4.65 MB | 1 年前3
Conan 2.5 DocumentationCMake(self) cmake.install() def package_info(self): (continues on next page) 4.2. Creating packages 53 Conan Documentation, Release 2.5.0 (continued from previous page) self.cpp_info.libs = ["hello"] package_info() method. Let’s have a look at the package_info() method of our hello/1.0 Conan package: Listing 53: conanfile.py ... class helloRecipe(ConanFile): name = "hello" version = "1.0" ... def package_info(self): 2ce8b28117dee53 hello/0.1: RUN: git fetch origin --dry-run --depth=1␣ ˓→cb7815a58529130b49da952362ce8b28117dee53 hello/0.1: WARN: Current commit cb7815a58529130b49da952362ce8b28117dee53 doesn't exist␣0 码力 | 769 页 | 4.70 MB | 1 年前3
Conan 2.2 Documentationpackage(self): cmake = CMake(self) cmake.install() (continues on next page) 4.2. Creating packages 53 Conan Documentation, Release 2.2.3 (continued from previous page) def package_info(self): self package_info() method. Let’s have a look at the package_info() method of our hello/1.0 Conan package: Listing 53: conanfile.py ... class helloRecipe(ConanFile): name = "hello" version = "1.0" ... def package_info(self): 2ce8b28117dee53 hello/0.1: RUN: git fetch origin --dry-run --depth=1␣ ˓→cb7815a58529130b49da952362ce8b28117dee53 hello/0.1: WARN: Current commit cb7815a58529130b49da952362ce8b28117dee53 doesn't exist␣0 码力 | 718 页 | 4.46 MB | 1 年前3
Conan 2.4 DocumentationCMake(self) cmake.install() def package_info(self): (continues on next page) 4.2. Creating packages 53 Conan Documentation, Release 2.4.1 (continued from previous page) self.cpp_info.libs = ["hello"] package_info() method. Let’s have a look at the package_info() method of our hello/1.0 Conan package: Listing 53: conanfile.py ... class helloRecipe(ConanFile): name = "hello" version = "1.0" ... def package_info(self): 2ce8b28117dee53 hello/0.1: RUN: git fetch origin --dry-run --depth=1␣ ˓→cb7815a58529130b49da952362ce8b28117dee53 hello/0.1: WARN: Current commit cb7815a58529130b49da952362ce8b28117dee53 doesn't exist␣0 码力 | 769 页 | 4.69 MB | 1 年前3
Conan 2.10 DocumentationCMake(self) cmake.install() def package_info(self): (continues on next page) 4.2. Creating packages 53 Conan Documentation, Release 2.10.1 (continued from previous page) self.cpp_info.libs = ["hello"] using cmake.install() as the CMake- Lists.txt will not copy this file to the package folder. Listing 53: conanfile.py def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self 2ce8b28117dee53 hello/0.1: RUN: git fetch origin --dry-run --depth=1␣ ˓→cb7815a58529130b49da952362ce8b28117dee53 hello/0.1: WARN: Current commit cb7815a58529130b49da952362ce8b28117dee53 doesn't exist␣0 码力 | 803 页 | 5.02 MB | 10 月前3
Conan 2.6 DocumentationCMake(self) cmake.install() def package_info(self): (continues on next page) 4.2. Creating packages 53 Conan Documentation, Release 2.6.0 (continued from previous page) self.cpp_info.libs = ["hello"] package_info() method. Let’s have a look at the package_info() method of our hello/1.0 Conan package: Listing 53: conanfile.py ... class helloRecipe(ConanFile): name = "hello" version = "1.0" ... def package_info(self): 2ce8b28117dee53 hello/0.1: RUN: git fetch origin --dry-run --depth=1␣ ˓→cb7815a58529130b49da952362ce8b28117dee53 hello/0.1: WARN: Current commit cb7815a58529130b49da952362ce8b28117dee53 doesn't exist␣0 码力 | 777 页 | 4.91 MB | 10 月前3
Conan 2.9 DocumentationCMake(self) cmake.install() def package_info(self): (continues on next page) 4.2. Creating packages 53 Conan Documentation, Release 2.9.3 (continued from previous page) self.cpp_info.libs = ["hello"] using cmake.install() as the CMake- Lists.txt will not copy this file to the package folder. Listing 53: conanfile.py def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self 2ce8b28117dee53 hello/0.1: RUN: git fetch origin --dry-run --depth=1␣ ˓→cb7815a58529130b49da952362ce8b28117dee53 hello/0.1: WARN: Current commit cb7815a58529130b49da952362ce8b28117dee53 doesn't exist␣0 码力 | 795 页 | 4.99 MB | 10 月前3
共 223 条
- 1
- 2
- 3
- 4
- 5
- 6
- 23













