Hey! Welcome to this repository. This is the notes-keeping place for teaching myself C++, modern C++ in specific. It might also include some auxiliary topics about useful tools.
I learned traditional C++98 a few years ago and didn't quite work on this programming language recently. In order to better prepare myself for workplace once I graduate from school, I will teach myself modern C++ in leisure time and update notes here. Hopefully, this notes could also help other people wishing to get onboard with modern C++.
Aside from book reading notes, mostly I will be borrowing good resources from all over the repos on github, and re-implement them for deepening understanding. Sources are pointed out in each one.
I finished reading on
Currently I am reading the comprehensive book <C++ Software Design: Design Principles and Patterns for High-Quality Software> to learn some design principles and best practices.
- Google C++ Style Guidance
- Git tutorial
- Gdb tutorial
- Makefile tutorial
- Socket Programming tutorial
- How to intergate with GoogleTest using CMake
- How to use Google's Protocol Buffer
- How to write a Reader-Writer lock
- How to design a Key-Value store using SkipList
- How to design a multi-user chatroom using Socket Programming
- How does Webbench-1.5 work - source code annotation
- How to write Smart Pointers
- C++ New Features Clarification
- <C++ Concurrency in Action>
- <Effective Modern C++>
- Deducing Types
- auto
- Moving to Modern C++
- Distinguish between () and {} when creating objects
- Prefer nullptr to 0 and NULL
- Prefer alias declarations to typedefs
- Prefer scoped enums to unscoped enums
- Prefer deleted functions to private undefined ones
- Declare overriding functions override
- Prefer const_iterators to iterators
- Declare functions noexcept if they won't emit exceptions
- Use constexpr whenever possible
- Make const member functions thread safe
- Understand special member function generation
- Smart Pointers
- Use std::unique_ptr for exclusive-ownership resource management
- Use std::shared_ptr for shared-ownership resource management
- Use std::weak_ptr for std::shared_ptr-like pointers that can dangle
- Prefer std::make_unique and std::make_shared to direct use of new
- When using the Pimpl Idiom, define special member functions in the implementation file
- Rvalue References, Move Semantics, and Perfect Forwarding
- Understand std::move and std::forward
- Distinguish universal references from rvalue references
- Use std::move on rvalue references, std::forward on universal references
- Avoid overloading on universal references
- Familiarize yourself with alternatives to overloading on universal references
- Understand reference collapsing
- Assume that move operations are not present, not cheap, and not used
- Familiarize yourself with perfect forwarding failure cases
- Lambda Expressions
- The Concurrency API
- Prefer task-based programming to thread-based
- Specify std::launch::async if asynchronicity is essential
- Make std::threads unjoinable on all paths
- Be aware of varying thread handle destructor behavior
- Consider void futures for one-shot event communication
- Use std::atomic for concurrency, volatile for special memory
- <C++ Software Design Principles>
- The Art of Software Design
- The Art of Building Abstractions
- The Purpose of Design Patterns
- The Visitor Design Pattern
- The Strategy and Command Design Patterns
- The Adapter, Observer, and CRTP Design Patterns
- The Bridge, Prototype, and External Polymorphism Design Patterns
- The Type Erasure Design Pattern
- The Decorator Design Pattern
- The Singleton Pattern