Rico's Nerd Cluster

「离开世界之前 一切都是过程」

C++ - Enum

Static Functions And Keyword

Enum Class Enum class is a type safe way to initialize enums. It’s called “scoped enum”, which is an integral type under the hood. They do not implicitly convert to int or any other type to enforc...

Common Robotics CPP Software Packages

TBB

TBB TBB (Intel Threading Building Blocks) is a parallel-programming library that abstracts out details for managing threads, synchronization, or load balancing explicitly. Key features include: ...

C++ - Constness

constexpr, if constexpr, consteval

constexpr constexpr in C++ allows expressions to be evaluated at compile time rather than runtime. This feature helps optimize programs by computing constant values during compilation and enables ...

C++ - Cpp14, 17, 20 Features

Lambda Capture

Introduction What is C++? My definition is that C++ is a set of progressive standards. So far, there are C++98/03 (small modification), C++ 11 (Major Release), C++ 14, C++17, C++20, C++23. Each st...

C++ [Container 3] Container Adaptors

std::queue, std::stack, std::priority_queue

std::queue, std::stack, std::priority_queue are NOT sequence containers, instead, they are wrappers around std::deque, and std::vector to provide a restricted interface. (FIFO for queue, LIFO for s...

C++ - [Container 2] Sequence Containers

std::iota, std::generate, std::vector, std::array, std::list, std::deque, std::forward_list

Introduction Sequence containers in C++ include: vector, array, list, forward_list, deque. The common operations I look are are: Initialization Push front, push back Sequential Access, ran...

C++ - [Container 1] Associative Container

std::set, std::unordered_set, std::map, std::unordered_map, std::multiset, std::unordered_multiset, std::unordered_multimap

Introduction Associative containers in C++ are containers that allows fast retrieval of elements based on keys, rather than positions. Construction: std::set, and std::map also have sorting us...

C++ - Pointers

Raw Pointers, Array, Casting

Raw Pointers 🚀 Basics new and delete: If you use new, you must use delete — otherwise, memory leak! see code. new[]:size must be provided as part of the signature. ...

C++ - BLAS and LAPACK

Scientific Computing Libraries

Article: BLAS (“Basic Linear Algebra Subalgorithms”) BLAS is a set of specifications of linear algebra operations such as vector addition, scalar multiplication, dot products, etc. It’s categorize...

C++ - Casting

Ever tried convincing your boss that your need for vacation is a 'const' by using const_cast? Welcome to C++ casting!

Introduction TODO - coming soon ;) Const Casting ❗ const_cast is needed sometimes to form a pointer/reference to a const object to interface with legacy code. Modifying the char* might lead to u...