Introduction to C++20 jthread std::threadGenerally, we have to control std::thread‘s life cycle by writting join/detach manually, but actually RAII can help to do it perfectly. Fortuantely, we can achieve it by using std::jth 2023-04-03 dev > cpp > stl #cpp #cpp20 #stl #thread #jthread
What is std::shared_ptr The implementation of std::shared_ptr shown in this page is from MSVC STL. ArchitectureclassDiagram _Ptr_base <|-- shared_ptr _Ptr_base <|-- weak_ptr _Ptr_base o-- _Ref 2023-04-02 dev > cpp > stl #pointer #cpp #cpp11 #stl #smart_pointer #shared_ptr #enable_shared_from_this
What is std::unique_ptr Smart PointerAs we know, using raw pointer has the opportunity to reault in memory leak if we forget to delete it or delete it with a wrong way. Therefore, there are potential risks. In traditional C+ 2023-04-01 dev > cpp > stl #pointer #cpp #cpp11 #stl #smart_pointer #unique_ptr
Configure Cmake A basic CmakeLists.txt example from a WebServer library.Help to quickly start a project. Basic file tree1234567891011.├── CMakeLists.txt├── src│ ├── CMakeLists.txt│ ├── Im 2023-03-31 configuration > cmake #configuration #cmake #make #cmakelists
What is pointer A tutorial for C language beginners. Pointer is an addressAs we all know, a variable or object always has a memory address, either on stack or on heap. For example, we suppoes 2023-03-30 dev > c #c #basic #pointer
Introduction to C++20 Concepts Why we need Concepts?If we declare multiple classes: 123class Base {...};class Derived : public Base {...};class NotDerived {...}; I ever met a situation where I would l 2023-03-29 dev > cpp > stl #cpp #cpp20 #stl #concepts
Configure Vim Install plug.vim file1curl https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim > ~/.vim/autoload Configure .vimrc file Copy the below configuration to ~/.vimrc. 2023-03-28 configuration > vim #configuration #vim
TODO List what category of articles would be written. C++ Deleter in std::shared_ptr What is enable_shared_from_this Concepts jthread RTTI std::allocator std::string_view, s 2023-03-27 #todo