
C++
文章平均质量分 66
MYTCHITOS
这个作者很懒,什么都没留下…
展开
-
关于`QObject: Cannot create children for a parent that is in a different thread`
作为一个qt初学者,免不了要踏入QObject: Cannot create children for a parent that is in a different thread这个坑,不论是官方文档、stackoverflow还是csdn,看了半天也摸不着头脑,只好老老实实研究错误代码,最终解决了问题,这里记录一下。代码从这里开始,一些不同重要的内容就略去了。Class Worker:pu...原创 2020-05-02 17:37:53 · 4039 阅读 · 9 评论 -
《C++ Template》笔记 Chapter 28 Debugging Templates
文章目录28.1 Shallow InstantiationConcept Checking28.2 Static Assertions28.3 Archetypes28.4 Tracers28.5 Oracles模板调试有两个挑战。一个是对模板开发者的:对于符合文档要求的任意模板参数,如何确保模板都能够正常工作。另一方面,则是对模板的使用者:当模板不能像文档所说的那样工作时,怎样找出不符合文档...原创 2019-12-10 18:20:22 · 329 阅读 · 0 评论 -
《C++ Template》笔记 Chapter 27 Expression Templates
文章目录27.1 Templates and Split Loops27.2 Encoding Expressions in Template Arguments27.2.1 Operands of the Expression Templates27.2.2 The `Array` Type27.2.3 The Operators27.2.4 Review27.2.5 Expression Te...原创 2019-12-08 17:54:12 · 342 阅读 · 0 评论 -
《C++ Template》笔记 Chapter 26 Discriminated Unions
文章目录26.1 Storage26.2 Design26.3 Value Query and Extraction26.4 Element Initialization,Assignment and Destruction26.4.1 Initialization26.4.2 Destruction26.4.3 AssignmentSelf-AssignmentExceptionsstd::la...原创 2019-12-05 20:33:28 · 392 阅读 · 0 评论 -
《C++ Template》笔记 Chapter 25 Tuples
文章目录25.1 Basic Tuple Design25.1.1 Storage25.1.2 Construction25.2 Basic Tuple Operations25.2.1 Comparison25.2.2 Output25.3 Tuple Algorithms25.3.1 Tuples as Typelists25.3.2 Adding to and Removing from a...原创 2019-11-18 17:17:38 · 546 阅读 · 0 评论 -
《C++ Template》笔记 Chapter 24 Typelists
文章目录24.1 Anatomy of a Typelist24.2 Typelist Algorithms24.2.1 Indexing24.2.2 Finding the Best Match24.2.3 Appending to a Typelist24.2.4 Reversing a Typelist24.2.5 Transfoming a Typelist24.2.6 Accumulat...原创 2019-10-21 18:31:22 · 302 阅读 · 0 评论 -
《C++ Template》笔记 Chapter 23 Metaprogramming
文章目录The State of Modern C++ Metaprogramming23.1.1 Value Metaprogramming23.1.2 Type Metaprogramming23.1.3 Hybrid Metaprogramming23.1.4 Hybrid Metaprogramming for Unit Types23.2 The Dimensions of Reflec...原创 2019-10-15 17:46:33 · 489 阅读 · 0 评论 -
《C++ Template》笔记 Chapter 22 Bridging Static and Dynamic Polymorphism
文章目录22.1 Function Objects,Pointers,and `std::function<>`22.2 Generalized Function Pointers22.3 Bridge Interface22.4 Type Erasure22.5 Optional Bridging22.6 Performance Considerations静态多态与非多态代码有同...原创 2019-10-12 15:32:19 · 437 阅读 · 0 评论 -
《C++ Template》笔记 Charpter 21 Templates and Inheritance
文章目录21.1 The Empty Base Class Optimization(EBCO)21.1.1 Layout Principles21.1.2 Members as Base Classes21.2 The Curiously Recurring Template Pattern(CRTP)21.2.1 The Barton-Nackman Trick21.2.2 Operator ...原创 2019-10-08 17:20:20 · 559 阅读 · 0 评论 -
《C++ Template》笔记 Charpter 20 Overloading on Type Properties
文章目录20.1 Algorithm Specialization20.2 Tag Dispatching20.3 Enabling/Disabling Function Templates20.3.1 Providing Multiple Specialization20.3.2 Where Does the EnableIf Go?20.3.3 Compile-Time `if`20.3.4 ...原创 2019-09-28 17:44:44 · 321 阅读 · 0 评论 -
《C++ Templates》笔记 Charpter 19 Implementing Traits(4)
文章目录19.8 Type Classification19.8.1 Determining Fundamental Types19.8.2 Determining Compound TypesPointersReferencesArraysPointers to Members19.8.3 Identifying Function Types19.8.4 Determining Class Ty...原创 2019-09-24 16:59:15 · 203 阅读 · 0 评论 -
《C++ Templates》笔记 Charpter 19 Implementing Traits(3)
文章目录19.6 Detecting Member19.6.1 Detecting Member TypesDealing with Reference TypesInjected Class Names19.6.2 Detecting Arbitrary Member Types19.6.3 Detecting Nontype MembersDetecting Member FunctionsD...原创 2019-09-22 14:26:22 · 210 阅读 · 0 评论 -
《C++ Templates》笔记 Charpter 19 Implementing Traits(2)
文章目录19.4 SFINAE-Based Traits19.4.1 SFINAE Out Function OverloadsAlternative Implementation Strategies for SFINAE-based TraitsMaking SFINAE-based Traits Predicate Traits我们来看看这里发生了什么。19.4.2 SFINAE Out P...原创 2019-09-16 16:40:56 · 411 阅读 · 3 评论 -
《C++ Templates》笔记 Charpter 19 Implementing Traits(1)
Charpter 19 Implementing Traits文章目录Charpter 19 Implementing Traits19.1 An Example:Accumulating a Squence19.1.1 Fixed Traits19.1.2 Value Traits19.1.3 Parameterized Traits19.2 Traits versus Policies an...原创 2019-09-04 18:11:55 · 191 阅读 · 0 评论 -
《C++ Templates》笔记 Chapter 18 The Polymorphic Power of Templates
Chapter 18 The Polymorphic Power of Templates文章目录Chapter 18 The Polymorphic Power of Templates18.1 Dynamic Polymorphism18.2 Static Polymorphism18.3 Dynamic versus Static PolymophismTerminologyStren...原创 2019-09-01 19:43:24 · 172 阅读 · 0 评论 -
《C++ Templates》笔记 Chapter 16 Specialization and Overloading - Charpter 17 Future Directions
C++ Templates : Chapter 16 Specialization and Overloading文章目录C++ Templates : Chapter 16 Specialization and Overloading16.1 When “Generic Code” Doesn’t Quite Cut It16.1.1 Transparent Customization16.1...原创 2019-08-30 18:43:58 · 427 阅读 · 0 评论 -
《C++ Templates 》笔记 Chapter 14 Instantiation - Chapter 15 Template Argument Deduction
C++ Templates PartII(2):Templates in DepthChapter 14 Instantiation14.1 On-Demand Instantiationtemplate<typename T> class C; //#1 只是声明C<int>* p=0; //#2 没问题,不需要知道C<int>的定义templ...原创 2019-08-22 18:42:53 · 514 阅读 · 0 评论 -
《C++ Templates》笔记 Chapter 12 Fundamentals in Depth-Chapter 13 Names in Templates
文章目录Chapter 12 Fundamentals in Depth12.1 Parameterized Declarations12.1.1 Virtual Member Functions12.1.2 Linkage of Templates12.1.3 Primary Template12.2 Template Parameters12.2.1 Type Parameters12.2.2...原创 2019-08-07 17:25:32 · 257 阅读 · 0 评论 -
《C++ Templates》笔记 PartI:The Basics
C++ Templates PartI:The Basics文章目录C++ Templates PartI:The BasicsChapter 1 Function Templates1.1 A First Look at Functiion Templates1.1.1 Defining the Template1.1.2 Using the Template1.1.3 Two-Phase...原创 2019-07-25 17:24:30 · 939 阅读 · 0 评论