Template Metaprogramming: Type Traits## CppCon 2020 Template Metaprogramming: Type Traits Part 1 Jody Hagins jhagins@maystreet.com coachhagins@gmail.com ## CppCon 2020 Template Metaprogramming: Type Traits Introduction ## I ntended Audience depth, slow current - Not necessarily beginner to C++, but beginner to traditional template metaprogramming techniques ## I ntended Audience • Beginner/Intermediate • Gentle entry: swimming pool to river depth, slow current - Not necessarily beginner to C++, but beginner to traditional template metaprogramming techniques • Type traits part of standard library for ~10 years ## I ntended Audience • Beginner/Intermediate0 码力 | 403 页 | 5.30 MB | 1 年前3
Template-Less Meta-Programming## Template-Less MetaProgramming 0 ## +24 ## KRIS JUSIAK 2024 September 15 - 20 ## Template Metaprogramming (TMP) templateusing meta_fun = this_talk ## te::Metaprogramming::is_hard); // ✓ ?static_assert(Template::Metaprogramming::is_hard); // ✓ ?static_assert(Template::Metaprogramming::is_powerful); // ✓ ?static_assert(Template::Metaprogramming::is_hard); static_assert(Template::Metaprogramming::is_powerful); // ✓ ?static_assert(( Template::Metaprogramming::is_easy and Template::Metaprogramming::is_powerful and Template::Metaprogramming::has_nice_error_messages; 0 码力 | 130 页 | 5.79 MB | 1 年前3
Julia 1.9.0 rc1 DocumentationFunctions & Methods ..... 220 17.4 Advanced Usage ..... 221 17.5 Syntax Guide ..... 222 18 Metaprogramming ..... 227 18.1 Program representation ..... 227 18.2 Expressions and evaluation ..... 230 Powerful shell-like capabilities for managing other processes • Lisp-like macros and other metaprogramming facilities ## Chapter 2 ## Getting Started Julia installation is straightforward, whether using packages may also define new non-standard string literals. Further documentation is given in the Metaprogramming section. ### 7.9 Regular Expressions Sometimes you are not looking for an exact string, but0 码力 | 1644 页 | 5.27 MB | 2 年前3
An Introduction to Lean4.3 Induction and Calculation 42 4.4 Axioms 45 5 Using Automation in Lean 46 6 Metaprogramming in Lean 47 Bibliography # Overview This introduction offers a tour of Lean and its features results are indeed correct. Which brings us to yet another aspect of Lean, namely, its role as a metaprogramming language. Many of Lean’s internal data structures and procedures are exposed and available within language of Lean itself, via a monadic interface. We refer to the use of these procedures as “metaprogramming” because they take us outside the formal framework: the access points to the API are declared0 码力 | 48 页 | 191.92 KB | 2 年前3
Julia v1.3.1 DocumentationGlobal Variables ..... 214 Multiple Objects ..... 215 Macro-generated code ..... 215 27 Metaprogramming ..... 217 27.1 Program representation ..... 217 Symbols ..... 218 27.2 Expressions and evaluation Powerful shell-like capabilities for managing other processes • Lisp-like macros and other metaprogramming facilities Part II Julia v1.3 Release Notes Powered by TCPDF (www.tcpdf.org) ## Chapter 2 ## described below, are some examples of non-standard string literals. Other examples are given in the Metaprogramming section. ### 16.9 Regular Expressions Julia has Perl-compatible regular expressions (regexes)0 码力 | 1276 页 | 4.36 MB | 2 年前3
Reflection Based Libraries to Look Forward Tomember_info.name() << std::endl; ## How is this different from metaprogramming? ## Reflection vs metaprogramming ## • Not much:) • Operate on values instead of types ☐ Syntactic difference find function signature? ■ P3096 helps :) "Function Parameter Reflection" Can also do metaprogramming (Boost.CallableTraits etc) ## • Runtime virtual interface means cannot use template types ☀️ signature? ■ P3096 helps :) "Function Parameter Reflection in Reflection" Can also do metaprogramming (Boost.CallableTraits etc) • Runtime virtual interface means cannot use template types • Type0 码力 | 118 页 | 14.33 MB | 1 年前3
Julia 1.9.0 beta4 DocumentationFunctions & Methods ..... 220 17.4 Advanced Usage ..... 221 17.5 Syntax Guide ..... 222 18 Metaprogramming ..... 227 18.1 Program representation ..... 227 18.2 Expressions and evaluation ..... 230 Powerful shell-like capabilities for managing other processes • Lisp-like macros and other metaprogramming facilities ## Chapter 2 ## Getting Started Julia installation is straightforward, whether using packages may also define new non-standard string literals. Further documentation is given in the Metaprogramming section. ### 7.9 Regular Expressions Sometimes you are not looking for an exact string, but0 码力 | 1639 页 | 5.25 MB | 2 年前3
Compile-Time Validationexpected. Some C++ computations run at compile-time by using constexpr, consteval, or template metaprogramming. These compile-time components can also be tested at compile-time. ## Unit Tests Setup The using T2 = decltype(*itr); static_assert(is_same_v ## Compiler Loophole – Stateful Metaprogramming • A friend function exists outside of the class it is declared in. - When a template class record operations • Uses macros to record control flow • Uses compiler loophole for stateful metaprogramming ## C++26 Reflection Use std::meta::info to record generic actions. Query std::meta::info to0 码力 | 137 页 | 1.70 MB | 1 年前3
Expressive Compile-time Parsersuments/9/a/3/c/9a3c029d0db11594467a24cca15ee3f1/p4_1.jpg) Language Evolution API Design Metaprogramming Tricks ## About the talk • Expressiveness in C++ • Parsers • Operator overloading • Domain “…The syntax and techniques needed are pretty horrendous.” - C++ core guidelines (template metaprogramming) struct plus_exp : foldl_reject_incomplete_start_with_parser0 码力 | 134 页 | 1.73 MB | 1 年前3
Some Things C++ Does Rightelegance template Programming with a value-based language  ## Programming with a value-based Language  criticize initialization in C++ • There are so many ways... • …0 码力 | 228 页 | 2.47 MB | 1 年前3
共 252 条
- 1
- 2
- 3
- 4
- 5
- 6
- 26
相关搜索词
metaprogramming techniquestype traitsspecializationprimary templatemetafunctionsTemplate Metaprogrammingboost.mp11Circle-langvalue-based metaprogrammingcompile timeJuliaREPLCrashesMetaprogrammingReflectionLeandependent type theorytacticsmetaprogrammingautomationDocumentationControl FlowMathematical OperationsMulti-ThreadingC++Python bindingsABI hashingTemplate metaprogrammingUnicodeUTF-8C functionsshell-like capabilitiesCompile-Time ValidationMitziconstexprtemplate metaprogrammingC++23Expressive Compile-time ParsersMetaprogramming TricksAPI DesignDomain Specific Languages内存管理初始化类型系统效率













