Contents
- Getting started
- Hello World
- Comments
- The standard C++ compilation process
- Function
- Visibility of function prototypes and declarations
- Preprocessor
- Compiling with GCC
- Compiling with Clang
- Compiling with Visual C++ Command Line
- Compiling with Visual Studio Graphical Interface - Hello World
- Generating Build Environment with CMake
- Compiling with GNU make
- Literals
- Basic type keywords
- Operator precedence
- Floating point arithmetic
- Bit operators
- Bit manipulation
- Bit fields
- Arrays
- Flow control
- const keyword
- Loops
- mutable keyword
- friend keyword
- keywords
- Class types
- decltype
- class
- float
- bool
- void
- Controlling alignment
- Thread-local storage
- register
- char
- char16_t
- char32_t
- short
- long
- double
- int
- wchar_t
- enum
- if
- do
- else
- default
- explicit
- true
- false
- continue
- const
- for
- goto
- struct
- case
- mutable
- noexcept
- nullptr
- catch
- return
- signed
- unsigned
- Different keywords
- static
- this
- switch
- throw
- try
- break
- union
- asm
- volatile
- Querying the alignment of a type
- sizeof
- typename
- Variable declaration keywords
- auto keyword
- Pointers
- Type keywords (class, enum, struct, union)
- Classes / structs
- Class basics
- Final classes and structs
- Access specifiers
- Inheritance
- Friendship
- Virtual Inheritance
- Member types and aliases
- Accessing class members
- Private inheritance restricting base class interface
- Nested classes / structures
- Multiple Inheritance
- Static class members
- Non-static member functions
- Unnamed struct / class
- std::string
- std:string
- Tokenize
- Conversion to const char
- Using the std::string_view class
- Conversion to std::wstring
- Trimming characters at start / end
- Lexicographical comparison
- String replacement
- Converting to std::string
- Checking if a string is a prefix of another
- Accessing a character
- Looping through each character
- Splitting
- Concatenation
- Conversion to integersfloating point types
- Converting between character encodings
- Finding characters in a string
- Enumeration
- std::atomic<T>
- std::vector
- std::vector
- Accessing Elements
- Initializing a std::vector
- Deleting Elements
- Iterating over std::vector
- std::vector<bool> : the exception to many rules
- Inserting elements
- Using std::vector as a C array
- Concatenating Vectors
- Finding an element in std::vector
- Using a sorted vector for fast element lookup
- Reducing the capacity of a vector
- Matrices using vectors
- Vector size and capacity
- Iterator / pointer invalidation
- Find max and min Element and Respective Index in a Vector
- Functions Returning Large Vectors
- Converting an array to std::vector
- std::array
- std::pair
- std::map
- std::unordered_map
- std::set and std::multiset
- std::any
- std::variant
- std::optional
- std::integer_sequence
- std::function
- std::forward_list
- std::iomanip
- Iterators
- Basic I/O
- File I/O
- Writing to a file
- Opening a file
- Reading from a file
- Opening modes
- Reading text file into a std::string
- Writing files with non-standard locale settings
- Checking end of file inside a loop condition bad practice
- Flushing a stream
- Reading a file into a container
- Copying a file
- Closing a file
- Reading a struct from a formatted text file
- Streams
- Stream manipulators
- Metaprogramming
- Returning multiple values from a function
- References
- Polymorphism
- Value and reference semantics
- Function call by value vs. by reference
- Copying vs assignment
- Pointers to class / struct members
- The this pointer
- Smart pointers
- Unique ownership (std::unique_ptr)
- Sharing ownership std::shared_ptr
- Sharing with temporary ownership std::weak_ptr
- Using custom deleters to create a wrapper to a C interface
- Casting std::shared_ptr pointers
- Writing a smart pointer value_ptr
- Getting a shared_ptr referring to this
- Unique ownership without move semantics std::auto_ptr
- Unions
- Templates
- Templates
- Basic class template
- Curiously recurring template pattern (CRTP)
- Function templates
- Iterating over a parameter pack
- CRTP to avoid code duplication
- Variadic template data structures
- Partial template specialization
- Argument forwarding
- Template specialization
- Template parameter deduction for constructors
- Alias template
- Template template parameters
- Non-type template parameter
- Declaring non-type template arguments with auto
- Explicit instantiation
- Default template parameter value
- Namespaces
- Function overloading
- Operator overloading
- Lambdas
- Lambdas
- What is a lambda expression
- Specifying the return type
- Capture by value
- Recursive lambdas
- Default capture
- Generic lambdas
- Class lambdas and capture of this
- Capture by reference
- Generalized capture
- Conversion to function pointer
- Using lambdas for inline parameter pack unpacking
- Porting lambda functions to C 03 using functors
- Threading
- Threading
- Creating a std::thread
- Passing a reference to a thread
- Using std::async instead of std::thread
- Create a simple thread pool
- Ensuring a thread is always joined
- Basic Synchronization
- Using Condition Variables
- Operations on the current thread
- Thread operations
- Thread-local storage
- Reassigning thread objects
- Value categories
- Preprocessor
- SFINAE
- Rule of three, five and zero
- RAII
- Exceptions
- Implementation-defined behavior
- Size of integral types
- Char might be unsigned or signed
- Number of bits in a byte
- Numeric value of a pointer
- Ranges of numeric types
- Value representation of floating point types
- Overflow when converting from integer to signed integer
- Order of initialization of globals across TU
- Underlying type and size of an enum
- Special member functions
- Random numbers
- Sorting
- Sorting
- Sorting and sequence containers
- Sorting sequence containers with specifed ordering
- Sorting sequence containers by overloaded less operator
- Sorting sequence containers using compare function
- Sorting sequence containers using lambda expressions
- sorting with std::map ascending and descending
- Sorting built-in arrays
- Regular expressions
- Perfect forwarding
- Virtual member functions
- Undefined behavior
- Undefined Behavior
- Reading or writing through a null pointer
- Using an uninitialized local variable
- Accessing an out-of-bounds index
- Deleting a derived object via a pointer to a base class that doesnt have a virtual destructor.
- Extending the std or posix Namespace
- Accessing a dangling reference
- Integer division by zero
- No return statement for a function with a non-void return type
- Invalid pointer arithmetic
- Incorrect pairing of memory allocation and deallocation
- Signed Integer Overflow
- Shifting by an invalid number of positions
- Modifying a const object
- Value of an out-of-range enum
- Multiple non-identical definitions the One Definition Rule
- Overflow during conversion to or from floating point type
- Returning from a noreturn function
- Accessing an object as the wrong type
- Modifying a string literal
- Infinite template recursion
- Access to nonexistent member through pointer to member
- Destroying an object that has already been destroyed
- Result of some reinterpret_cast conversions
- Invalid derived-to-base conversion for pointers to members
- Invalid base-to-derived static_cast
- Calling Pure Virtual Members From Constructor Or Destructor
- Floating point overflow
- Function call through mismatched function pointer type
- 290Static cast from bogus void value
- Overload resolution
- Move semantics
- Pimpl idiom
- Copy elision
- Fold expressions
- Unnamed types
- Singleton
- ISO C++ Standard
- User-defined literals
- Type erasure
- Memory management
- Explicit type conversions
- Explicit type conversions
- Casting away constness
- C-style casting
- Base to derived conversion
- Conversion between pointer and integer
- Type punning conversion
- Conversion by explicit constructor or explicit conversion function
- Implicit conversion
- Enum conversions
- Derived to base conversion for pointers to members
- void to T
- RTTI
- Standard library algorithms
- Expression templates
- Scopes
- Atomic types
- static assert
- constexpr
- Date and time with std::chrono
- Trailing return type
- Function template overloading
- Common compile linker errors
- Design patterns
- Optimizations
- Compiling and building
- Compiling and Building
- Compiling with GCC
- Generating Build Environment with CMake
- Compiling with Visual Studio Graphical Interface - Hello World
- Compiling with GNU make
- Online Compilers
- Compiling with Visual C Command Line
- Compiling with Clang
- The C compilation process
- Building with SCons
- Compiling with Code::Blocks Graphical interface
- Type traits
- One definition rule
- Unspecified behavio
- Unspecified behavior
- Value of an out-of-range enum
- Evaluation order of function arguments
- Result of some reinterpret cast conversions
- Space occupied by a reference
- Moved-from state of most standard library classes
- Static cast from bogus void value
- Result of some pointer comparisons
- Order of initialization of globals across TU
- Argument dependent name lookup
- Attributes
- Internationalization
- Profiling
- Return type covariance
- Non-static member functions
- Recursion
- Callable objects
- Constant class member functions
- C++ vs. C++ 11 vs C++ 17
- Inline functions
- Client server examples
- Header files
- Const correctness
- Refactoring techniques
- Parameter packs
- Iteration
- type deduction
- C++ 11 memory model
- Build systems
- Concurrency with OpenMP
- Type inference
- Resource management
- Storage class specifiers
- Alignment
- Inline variables
- Linkage specifications
- Curiusly recurring template pattern
- Using declaration
- Typedef and type aliases
- Layout of object types
- C incompatibilities
- Optimization
- Semaphore
- Thread synchronization
- Debugging
- Futures and promises
- More undefined behaviors
- Mutexes
- Recursive mutex
- Unit testing
- decltype
- Digit separators
- C++ Containers
- Arithmetic meta-programming
- Contributors