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.8.0 Documentation
documentation! Mypy is a static type checker for Python. Type checkers help ensure that you’re using variables and functions in your code correctly. With mypy, add type hints (PEP 484 [https://peps.python Unsupported operand types for + ("str" and "int") Adding type hints for mypy does not interfere with the way your program would otherwise run. Think of type hints as similar to comments! You can always use the means you can add type hints to your code base slowly and that you can always fall back to dynamic typing when static typing is not convenient. Mypy has a powerful and easy-to-use type system, supporting0 码力 | 318 页 | 271.55 KB | 1 年前3Mypy 1.10.0+dev Documentation
documentation! Mypy is a static type checker for Python. Type checkers help ensure that you’re using variables and functions in your code correctly. With mypy, add type hints (PEP 484 [https://peps.python Unsupported operand types for + ("str" and "int") Adding type hints for mypy does not interfere with the way your program would otherwise run. Think of type hints as similar to comments! You can always use the means you can add type hints to your code base slowly and that you can always fall back to dynamic typing when static typing is not convenient. Mypy has a powerful and easy-to-use type system, supporting0 码力 | 318 页 | 270.84 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 年前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 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. §23. 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 码力 | 610 页 | 945.17 KB | 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 码力 | 880 页 | 833.34 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 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100