Template Metaprogramming: Type Traits
Template Metaprogramming: Type Traits Part 1 CppCon 2020 1 Jody Hagins jhagins@maystreet.com coachhagins@gmail.comTemplate Metaprogramming: Type Traits CppCon 2020 2 IntroductionIntended Audience necessarily beginner to C++, but beginner to traditional template metaprogramming techniques • Type traits part of standard library for ~10 years 3Intended Audience • Beginner/Intermediate • Gentle necessarily beginner to C++, but beginner to traditional template metaprogramming techniques • Type traits part of standard library for ~10 years • Fundamentals have been in use for ~20 years 3Intended0 码力 | 403 页 | 5.30 MB | 5 月前3JAVA 应用与开发 - 泛型
0 码力 | 35 页 | 587.40 KB | 1 年前3The TypeScript Handbook
primitives. Narrowing Understand how TypeScript uses JavaScript knowledge to reduce the amount of type syntax in your projects. More on Functions Learn about how Functions work in TypeScript. Object take parameters Keyof Type Operator Using the keyof operator in type contexts. Typeof Type Operator Using the typeof operator in type contexts. Indexed Access Types Using Type['a'] syntax to access a a subset of a type. Conditional Types Create types which act like if statements in the type system. Mapped Types Generating types by re-using an existing type. Template Literal Types Generating mapping0 码力 | 184 页 | 647.99 KB | 1 年前3Mypy 1.8.0 Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Type hints cheat sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.5 Type inference and type annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.6 . . . . . . . . . . . . . . 55 1.11 Type narrowing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 1.12 Duck type compatibility . . . . . . . . . . . .0 码力 | 234 页 | 902.89 KB | 1 年前3Mypy 1.10.0+dev Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Type hints cheat sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.5 Type inference and type annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.6 . . . . . . . . . . . . . . 54 1.11 Type narrowing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 1.12 Duck type compatibility . . . . . . . . . . . .0 码力 | 234 页 | 913.89 KB | 1 年前3The Swift Programming Language (Swift 5.7) - Apps Dissected
choice for everything from “Hello, world!” to an entire operating system. Swift combines powerful type inference and pattern matching with a modern, lightweight syntax, allowing complex ideas to be expressed changes are available only to code that uses Swift 5.7 or later: Functions that return an opaque type require the Swift 5.1 runtime. The try? expression doesn’t introduce an extra level of optionality optionals. Large integer literal initialization expressions are inferred to be of the correct integer type. For example, UInt64(0xffff_ffff_ffff_ffff) evaluates to the correct value rather than overflowing0 码力 | 1040 页 | 10.90 MB | 1 年前3Go 101 (Golang 101) v1.21.0
Literals §7. Constants and Variables - also introduces untyped values and type deductions. §8. Common Operators - also introduces more type deduction rules. §9. Function Declarations and Calls §10. Code Packages §12. Basic Control Flows §13. Goroutines, Deferred Function Calls and Panic/Recover Go Type System §14. Go Type System Overview - a must read to master Go programming. §15. Pointers §16. Structs §17 Interfaces - value boxes used to do reflection and polymorphism. §24. Type Embedding - type extension in the Go way. §25. Type-Unsafe Pointers §26. Generics - use and read composite types §27. Reflections0 码力 | 630 页 | 3.77 MB | 1 年前3The Swift Programming Language
myConstant = 42 A constant or variable must have the same type as the value you want to assign to it. However, you don’t always have to write the type explicitly. Providing a value when you create a constant constant or variable lets the compiler infer its type. In the example above, the compiler infers that myVariable is an integer because its initial value is a integer. If the initial value doesn’t provide provide enough information (or if there is no initial value), specify the type by writing it after the variable, separated by a colon. 1 let implicitInteger = 70 2 let implicitDouble = 70.0 3 let explicitDouble:0 码力 | 525 页 | 4.68 MB | 1 年前3Reference guide for Free Pascal, version 3.2.2
Dynamic arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Dynamic array Type compatibility . . . . . . . . . . . . . . . . . . . . . . . 47 Dynamic array constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 3.5 Forward type declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.6 Procedural types 62 3.7.3 Variants and interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 3.8 Type aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 3.9 Managed0 码力 | 268 页 | 700.37 KB | 1 年前3Theorem Proving in Lean Release 3.23.0
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Dependent Type Theory 5 2.1 Simple Type Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 10 Type Classes 141 10.1 Type Classes and Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 10.5 Managing Type Class Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 10.6 Coercions using Type Classes . . . . . . . . . . . . . . .0 码力 | 173 页 | 777.93 KB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100