New features of C++11/14 -- template enhancement and variable templates

Template enhancement 1. External template 1) Problems of traditional C + + In traditional C + +, templates are instantiated by the compiler only when used. In other words, as long as the fully defined template is encountered in the code compiled in each compilation unit (file), it will be instantiated. This results in an increase in compi ...

Posted by slick101 on Wed, 19 Jan 2022 06:59:05 +0100

New features of C++11/14 -- right value reference, mobile semantics and perfect forwarding

1. Right value reference C + + introduces R-value reference and mobile semantics, which can avoid unnecessary replication and improve program performance. (1) Left and right values All in C + + must belong to one of left value and right value. Lvalue: refers to the persistent object that still exists after the end of the expression. Rig ...

Posted by Stalingrad on Sat, 15 Jan 2022 13:50:53 +0100

C++_Primer_ Study notes_ Chapter 19 (special tools and technologies)

Chapter 19 (special tools and technologies) /1. Control memory allocation 1). Standard memory management mechanisms cannot be applied directly. Some applications need to customize the details of memory allocation, such as using the keyword new to place objects in a specific memory space.In order to achieve this goal, we need to overload the ...

Posted by wayz1229 on Tue, 04 Jan 2022 06:46:57 +0100

C + + - implementation code with the least thread pool

preface During this time, I read the basic content of C + + concurrent programming practice and wanted to use the recently learned knowledge to realize a simple thread pool by myself. thinking Personal understanding of thread pool is to use a fixed number of threads that have been created to perform the specified tasks, so as to avoid th ...

Posted by lauriedunsire on Mon, 27 Dec 2021 14:47:10 +0100

Learning notes on zltool kit source code (15) event poller of event polling module

Catalogue of series articles Zltool kit source code learning notes (1) VS2019 source code compilation Log function analysis of the tool module of zltool kit source code learning notes (2) "Zltool kit source code learning notes" (3) terminal command analysis of tool module Message broadcaster of tool module of zltool kit source cod ...

Posted by PHPFreaksMaster on Sat, 25 Dec 2021 23:58:00 +0100

pair and tuple in c + +

1, Complex data structure in c + + Since c, c + + has also developed. Complex data structures are generally not supported in standard libraries. For example, multi-dimensional arrays, multi key KV, not to mention a complex batch of trees. In fact, it is well understood that as a low-level support language, c/c + + pursues high efficiency and m ...

Posted by DarrenL on Wed, 08 Dec 2021 08:39:56 +0100