C + + Hou Jie STL standard library and Generic Programming Notes
C++STL
This blog post refers to Mr. Hou Jie's STL generic programming course and records the more important parts for future review. I highly recommend Mr. Hou Jie's C + + series. It really exists like the Bible!
1.STL six components
Containers Allocators Algorithms Iterators Adapters Functors
2. Distributor
allocator completes al ...
Posted on Mon, 29 Nov 2021 14:43:18 -0500 by peppino
Special function generation mechanism of C + + classes
Special function generation mechanism of C + + classes
rule
Refer to the instructions on Effective Morder C + +
Default constructor: generated only if the class does not contain a user declared constructor.Destructor: generated by default. When the destructor of the base class is virtual, the default destructor of the derived class is virtua ...
Posted on Sat, 20 Nov 2021 20:57:29 -0500 by shatztal
2021SC@SDUSC BRPC source code analysis SOCKET
2021SC@SDUSC BRPC source code analysis (VII) SOCKET
Socket.cpp code analysis
int Socket::HandleEpollOut(SocketId id) {
SocketUniquePtr s;
if (Socket::AddressFailedAsWell(id, &s) < 0) {
// Ignore recycled sockets
return -1;
}
EpollOutRequest* req = dynamic_cast<EpollOutRequest*>(s->user());
...
Posted on Fri, 12 Nov 2021 15:30:33 -0500 by Thora_Fan
Analysis of C++ vector container
1, What is a vector?
A Vector is a Sequence Container that encapsulates a dynamic size array. Like any other type of container, it can hold various types of objects. It can be simply considered that a Vector is a dynamic array that can store any type.
2, Container characteristics
1. Sequence
The elements in the order container are sorted in ...
Posted on Tue, 19 Oct 2021 03:06:03 -0400 by tpearce2