 Named Optional Parameters - JavaScript StyleNamed Optional Parameters - JavaScript Style Brian Davidson (briandavidson@meta.com) Summary C++ developers often run into the situation where we have multiple parameters in a function with the same function arguments forming a clear function call Inspiration: Javascript The anonymous object parameters of javascript provide a readable function API. logger({one:0.9999}); > 0.9999 logger({one:"one"0 码力 | 1 页 | 3.17 MB | 6 月前3 Named Optional Parameters - JavaScript StyleNamed Optional Parameters - JavaScript Style Brian Davidson (briandavidson@meta.com) Summary C++ developers often run into the situation where we have multiple parameters in a function with the same function arguments forming a clear function call Inspiration: Javascript The anonymous object parameters of javascript provide a readable function API. logger({one:0.9999}); > 0.9999 logger({one:"one"0 码力 | 1 页 | 3.17 MB | 6 月前3
 C++23: An Overview of Almost All New and Updated Featuresof the Belgian C++ Users Group (BeCPP) C++204 Agenda  C++23 Core Language  Explicit Object Parameters  if consteval  Multidimensional Subscript Operator  Attributes on Lambda-Expressions  Literal Garbage Collection SupportC++23 Core Language6 Agenda  C++23 Core Language  Explicit Object Parameters  if consteval  Multidimensional Subscript Operator  Attributes on Lambda-Expressions  Literal Containers Heterogeneous Erasure  Removed Features  Garbage Collection Support7 Explicit Object Parameters  Instead of implicit this, explicitly specify the object parameter  Example: class Cell0 码力 | 105 页 | 759.96 KB | 6 月前3 C++23: An Overview of Almost All New and Updated Featuresof the Belgian C++ Users Group (BeCPP) C++204 Agenda  C++23 Core Language  Explicit Object Parameters  if consteval  Multidimensional Subscript Operator  Attributes on Lambda-Expressions  Literal Garbage Collection SupportC++23 Core Language6 Agenda  C++23 Core Language  Explicit Object Parameters  if consteval  Multidimensional Subscript Operator  Attributes on Lambda-Expressions  Literal Containers Heterogeneous Erasure  Removed Features  Garbage Collection Support7 Explicit Object Parameters  Instead of implicit this, explicitly specify the object parameter  Example: class Cell0 码力 | 105 页 | 759.96 KB | 6 月前3
 Back to Basics: Generic ProgrammingBasics11 David Olsen – Generic Programming CppCon 2024 Define a Template template Back to Basics: Generic ProgrammingBasics11 David Olsen – Generic Programming CppCon 2024 Define a Template template- parameters> declaration; declaration can be • class / struct • function • type alias • variable • concept Template Parameters Three kinds Type template parameter class|typename identifier Non-type template parameter (NTTP) type|auto identifier Template template parameter template - parameters> class|typename Template Parameters Three kinds Type template parameter class|typename identifier Non-type template parameter (NTTP) type|auto identifier Template template parameter template - parameters> class|typename 0 码力 | 175 页 | 1.16 MB | 6 月前3
 Back to Basics: Templates - Part 1terms of types to-be-specified-later • Algorithms were then instantiated on demand using type parameters • This approach came to be known as generic programming C++ supports generic programming with Back to Basics: Templates – Part 1 Copyright © 2021 Bob Steagall Template Parameters and Template Arguments • Template parameters are the names that come after the template keyword in a template declaration declaration • Template arguments are the concrete items substituted for template parameters to create a template specialization 44 template Back to Basics: Templates - Part 1terms of types to-be-specified-later • Algorithms were then instantiated on demand using type parameters • This approach came to be known as generic programming C++ supports generic programming with Back to Basics: Templates – Part 1 Copyright © 2021 Bob Steagall Template Parameters and Template Arguments • Template parameters are the names that come after the template keyword in a template declaration declaration • Template arguments are the concrete items substituted for template parameters to create a template specialization 44 template- struct pair { T1 first; T2 second; ... 0 码力 | 68 页 | 436.75 KB | 6 月前3
 Modern C++ Tutorial: C++11/14/17/20 On the Flyfor system programming and library development. Concepts verify the compile- time of template parameters, further enhancing the usability of the language. In conclusion, as an advocate and practitioner in the auto type inference section. 2.3 Type inference In traditional C and C++, the types of parameters must be clearly defined, which does not help us to quickly encode, especially when we are faced template parameter list. Before the keyword typename appears, class is used to define the template parameters. How- ever, when defining a variable with nested dependency type in the template, you need to0 码力 | 92 页 | 1.79 MB | 1 年前3 Modern C++ Tutorial: C++11/14/17/20 On the Flyfor system programming and library development. Concepts verify the compile- time of template parameters, further enhancing the usability of the language. In conclusion, as an advocate and practitioner in the auto type inference section. 2.3 Type inference In traditional C and C++, the types of parameters must be clearly defined, which does not help us to quickly encode, especially when we are faced template parameter list. Before the keyword typename appears, class is used to define the template parameters. How- ever, when defining a variable with nested dependency type in the template, you need to0 码力 | 92 页 | 1.79 MB | 1 年前3
 Back to Basics: Templates Part 2Basics: Templates – Part 2 Copyright © 2021 Bob Steagall Recap: Template Parameters and Template Arguments • Template parameters are the names that come after the template keyword in a template declaration declaration • Template arguments are the concrete items substituted for template parameters to create a template specialization 6 template Back to Basics: Templates Part 2Basics: Templates – Part 2 Copyright © 2021 Bob Steagall Recap: Template Parameters and Template Arguments • Template parameters are the names that come after the template keyword in a template declaration declaration • Template arguments are the concrete items substituted for template parameters to create a template specialization 6 template- struct pair { T1 first; T2 second; ... double d = max - (0, 1); string s1 = ...; string s2 = ...; string s3 = max(s1, s2); Template Parameters Template ArgumentsCppCon 2021 – Back to Basics: Templates – Part 2 Copyright © 2021 Bob Steagall 0 码力 | 80 页 | 490.15 KB | 6 月前3
 Conan 1.9 Documentationhowever, that even if you did have to run conan install again, since subsequent runs use the same parameters, they would be very fast since packages would already have been installed in the local cache rather test test_package Hello/0.1@demo/testing The conan create command receives the same command line parameters as conan install so you can pass to it the same settings, options, and command line switches. If default_user2 # By default all users can read all blocks */*@*/*: * [users] demo: demo Server Parameters • port: Port where conan_server will run. • The client server authorization is done with JWT0 码力 | 470 页 | 3.05 MB | 1 年前3 Conan 1.9 Documentationhowever, that even if you did have to run conan install again, since subsequent runs use the same parameters, they would be very fast since packages would already have been installed in the local cache rather test test_package Hello/0.1@demo/testing The conan create command receives the same command line parameters as conan install so you can pass to it the same settings, options, and command line switches. If default_user2 # By default all users can read all blocks */*@*/*: * [users] demo: demo Server Parameters • port: Port where conan_server will run. • The client server authorization is done with JWT0 码力 | 470 页 | 3.05 MB | 1 年前3
 Conan 2.0 Documentation$ conan list hello Local Cache: hello hello/1.0 The conan create command receives the same parameters as conan install, so you can pass to it the same settings and options. If we execute the following generates a conan_bzl.rc file that contains a build configuration conan-config to inject all the parameters into the bazel build command. • Bazel: the Bazel build helper. It’s simply a wrapper around the defines the conan-config bazel-build con- figuration. This file and the configuration are passed as parameters to the bazel build command. Apart from that, Conan uses the BazelDeps generator to create all the0 码力 | 652 页 | 4.00 MB | 1 年前3 Conan 2.0 Documentation$ conan list hello Local Cache: hello hello/1.0 The conan create command receives the same parameters as conan install, so you can pass to it the same settings and options. If we execute the following generates a conan_bzl.rc file that contains a build configuration conan-config to inject all the parameters into the bazel build command. • Bazel: the Bazel build helper. It’s simply a wrapper around the defines the conan-config bazel-build con- figuration. This file and the configuration are passed as parameters to the bazel build command. Apart from that, Conan uses the BazelDeps generator to create all the0 码力 | 652 页 | 4.00 MB | 1 年前3
 Conan 1.8 Documentationhowever, that even if you did have to run conan install again, since subsequent runs use the same parameters, they would be very fast since packages would already have been installed in the local cache rather test test_package Hello/0.1@demo/testing The conan create command receives the same command line parameters as conan install so you can pass to it the same settings, options, and command line switches. If default_user2 # By default all users can read all blocks */*@*/*: * [users] demo: demo Server Parameters • port: Port where conan_server will run. • The client server authorization is done with JWT0 码力 | 458 页 | 3.03 MB | 1 年前3 Conan 1.8 Documentationhowever, that even if you did have to run conan install again, since subsequent runs use the same parameters, they would be very fast since packages would already have been installed in the local cache rather test test_package Hello/0.1@demo/testing The conan create command receives the same command line parameters as conan install so you can pass to it the same settings, options, and command line switches. If default_user2 # By default all users can read all blocks */*@*/*: * [users] demo: demo Server Parameters • port: Port where conan_server will run. • The client server authorization is done with JWT0 码力 | 458 页 | 3.03 MB | 1 年前3
 Conan 2.1 Documentation$ conan list hello Local Cache: hello hello/1.0 The conan create command receives the same parameters as conan install, so you can pass to it the same settings 50 Chapter 4. Tutorial Conan Documentation generates a conan_bzl.rc file that contains a build configuration conan-config to inject all the parameters into the bazel build command. • Bazel: the Bazel build helper. It’s simply a wrapper around the defines the conan-config bazel-build con- figuration. This file and the configuration are passed as parameters to the bazel build command. Apart from that, Conan uses the BazelDeps generator to create all the0 码力 | 694 页 | 4.13 MB | 1 年前3 Conan 2.1 Documentation$ conan list hello Local Cache: hello hello/1.0 The conan create command receives the same parameters as conan install, so you can pass to it the same settings 50 Chapter 4. Tutorial Conan Documentation generates a conan_bzl.rc file that contains a build configuration conan-config to inject all the parameters into the bazel build command. • Bazel: the Bazel build helper. It’s simply a wrapper around the defines the conan-config bazel-build con- figuration. This file and the configuration are passed as parameters to the bazel build command. Apart from that, Conan uses the BazelDeps generator to create all the0 码力 | 694 页 | 4.13 MB | 1 年前3
共 168 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17













