{"id":92458,"url":"https://github.com/cybersecurity-dev/awesome-cpp-programming-language","name":"awesome-cpp-programming-language","description":"Awesome C++ Programming Language","projects_count":51,"last_synced_at":"2026-04-14T18:00:20.574Z","repository":{"id":305049664,"uuid":"1021753255","full_name":"cybersecurity-dev/awesome-cpp-programming-language","owner":"cybersecurity-dev","description":"Awesome C++ Programming Language","archived":false,"fork":false,"pushed_at":"2026-04-10T11:40:11.000Z","size":180,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-10T13:28:21.940Z","etag":null,"topics":["awesome","awesome-list","awesome-lists","cpp","cpp-programming","cpp-programming-language"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cybersecurity-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-17T22:34:18.000Z","updated_at":"2026-04-10T11:40:14.000Z","dependencies_parsed_at":"2025-07-18T04:26:22.141Z","dependency_job_id":"8166e6dd-9930-45ee-8236-fddec1b421f2","html_url":"https://github.com/cybersecurity-dev/awesome-cpp-programming-language","commit_stats":null,"previous_names":["cybersecurity-dev/awesome-cpp-programming-language"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cybersecurity-dev/awesome-cpp-programming-language","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybersecurity-dev%2Fawesome-cpp-programming-language","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybersecurity-dev%2Fawesome-cpp-programming-language/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybersecurity-dev%2Fawesome-cpp-programming-language/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybersecurity-dev%2Fawesome-cpp-programming-language/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cybersecurity-dev","download_url":"https://codeload.github.com/cybersecurity-dev/awesome-cpp-programming-language/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybersecurity-dev%2Fawesome-cpp-programming-language/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31808518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cp align=\"center\"\u003e\n        \u003ca href=\"https://cppreference.com/\"\u003e\n          \u003cimg width=\"10%\" src=\"https://github.com/cybersecurity-dev/cybersecurity-dev/blob/main/assets/Cpp_logo.svg\" /\u003e\n        \u003c/a\u003e\n    \u003c/p\u003e\n\n# **`Awesome`** [C++](https://wikipedia.org/wiki/C%2B%2B) Programming [Language](https://wikipedia.org/wiki/Category:C%2B%2B_libraries) [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) \n[**`C++11`**](https://wikipedia.org/wiki/C%2B%2B11) | [**`C++14`**](https://en.wikipedia.org/wiki/C%2B%2B14) | [**`C++17`**](https://en.wikipedia.org/wiki/C%2B%2B17) | [**`C++20`**](https://en.wikipedia.org/wiki/C%2B%2B20) | [**`C++23`**](https://en.wikipedia.org/wiki/C%2B%2B23) | [**`C++26`**](https://en.wikipedia.org/wiki/C%2B%2B26)\n\u003c/div\u003e\n\n[![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?style=for-the-badge\u0026logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiUR_6ABLxUUaY-Gcz9tzRm_\u0026si=ASTMXOYiVZ_qV4Ck)\n[![Reddit](https://img.shields.io/badge/Reddit-FF4500?style=for-the-badge\u0026logo=reddit\u0026logoColor=white)](https://www.reddit.com/r/cpp/)\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/cybersecurity-dev/\"\u003e\u003cimg height=\"25\" src=\"https://github.com/cybersecurity-dev/cybersecurity-dev/blob/main/assets/github.svg\" alt=\"GitHub\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://www.youtube.com/@CyberThreatDefence\"\u003e\u003cimg height=\"25\" src=\"https://github.com/cybersecurity-dev/cybersecurity-dev/blob/main/assets/youtube.svg\" alt=\"YouTube\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://cyberthreatdefence.com/my_awesome_lists\"\u003e\u003cimg height=\"20\" src=\"https://github.com/cybersecurity-dev/cybersecurity-dev/blob/main/assets/blog.svg\" alt=\"My Awesome Lists\"\u003e\u003c/a\u003e\n    \u003cimg src=\"https://github.com/cybersecurity-dev/cybersecurity-dev/blob/main/assets/bar.gif\"\u003e\n\u003c/p\u003e\n\n\n## 📖 Contents\n- [Containers](#containers)\n    - [Vector](#vector)\n    - [List](#list)\n    - [Deque](#deque)\n    - [Array](#array)\n- [Pointers and References](#pointers-and-references)\n    - [std::unique_ptr](#unique_ptr)\n    - [std::shared_ptr](#shared_ptr)\n- [Expressions](#expressions)\n    - [Lambda Expressions](#lambda-expressions)\n    - [Value Categories](#value-categories)\n- [Functions](#functions)\n- [Type Casting](#type-casting)\n    - [static_cast](#static_cast)\n    - [dynamic_cast](#dynamic_cast)\n    - [const_cast](#const_cast)\n    - [reinterpret_cast](#reinterpret_cast) \n- [Idioms](#idioms)\n    - [RAII](#raii-resource-acquisition-is-initialization)\n    - [PIMPL](#pimpl-pointer-to-implementation)\n    - [CRTP](#crtp-curiously-recurring-template-pattern)\n    - [Erase-Remove](#erase-remove)\n    - [Copy on Write](#copy-on-write)\n    - [Rule of N](#rule-of-n)    \n        - [The Rule of Three](#the-rule-of-three)\n        - [The Rule of Five](#the-rule-of-five)\n        - [The Rule of Zero](#the-rule-of-zero)\n    - [SFINE](#sfinae-substitution-failure-is-not-an-error)\n- [Specifiers](#specifiers)\n    - [Friend](#friend)\n - [Compile Time Specifiers](#compile-time-specifiers)\n    - [Constexpr (C++11)](#constexpr-c11)\n    - [Consteval (C++20)](#consteval-c20)\n    - [Constinit (C++20)](#constinit-c20)\n - [Language Concepts](#language-concepts)   \n    - [Virtual Methods](#virtual-methods)\n    - [Forward Declaration](#forward-declaration)\n    - [Special Member Functions](#special-member-functions)\n- [Concurrency \u0026 Parallelism \u0026 Multithreading](#concurrency--parallelism--multithreading)\n- [Framework and Libraries](#framework-and-libraries)\n- [Performance Analysis and Debugging Tool](#performance-analysis-and-debugging-tool)\n- [Package Managers](#package-managers)\n- [Severals](#severals)\n- [Standarts](#standarts)\n- [My Other Awesome Lists](#my-other-awesome-lists)\n- [Contributing](#contributing)\n- [Contributors](#contributors)\n\n\n## Containers\n\n### [Vector](https://cppreference.com/w/cpp/container/vector.html)\n\n```cpp\n#include \u003cvector\u003e\ntemplate\u003cclass T, class Allocator = std::allocator\u003cT\u003e\u003e class vector;\n```\nExcept for the `std::vector\u003cbool\u003e` partial specialization, the elements are stored contiguously, which means that elements can be accessed not only through iterators, but also using offsets to regular pointers to elements. \n\n```cpp\nstd::vector\u003cint\u003e ivec = { 1, 2, 3, 4, 5 };\n//lambda expression\nauto print = [](const int\u0026 n) { std::cout \u003c\u003c n \u003c\u003c ' '; };\n    \nstd::for_each(ivec.cbegin(), ivec.cend(), print);\nstd::cout \u003c\u003c std::endl;\nstd::for_each(ivec.crbegin(), ivec.crend(), print);\n```\n\n---\n\n### [List](https://cppreference.com/w/cpp/container/list.html)\n```cpp\n#include \u003clist\u003e\ntemplate\u003cclass T, class Allocator = std::allocator\u003cT\u003e\u003e class list;\n```\n\n`std::list` is a container that supports constant time insertion and removal of elements from anywhere in the container. Fast random access is **not supported**. It is usually implemented as a **`doubly-linked list`**. Compared to `std::forward_list` this container provides bidirectional iteration capability while being less space efficient.\n\n```cpp\nstd::list\u003cint\u003e ilist = { 5, 7, 11, 13 };\nfor (int n : ilist)\nstd::cout \u003c\u003c n \u003c\u003c \", \";\nstd::cout\u003c\u003c\"\\n-----------------\\n\";\n    \nilist.push_front(0);\nilist.push_back(-1);\nstd::for_each(ilist.cbegin(), ilist.cend(), [](auto val) { std::cout \u003c\u003c val \u003c\u003c \", \"; });\nstd::cout \u003c\u003c \"\\n-----------------\\n\";\n    \n//insert with using initializer list\nilist.insert(ilist.cend(), { 4, 3, 2, 1 });\nfor (auto it = ilist.cbegin(); it != ilist.cend(); ++it) {\n    std::cout \u003c\u003c *it \u003c\u003c \", \";\n}\n```\n\n---\n\n### [Deque](https://cppreference.com/w/cpp/container/deque.html)\n\n---\n\n### [Array](https://cppreference.com/w/cpp/container/array.html)\n```cpp\n#include \u003carray\u003e\ntemplate\u003cclass T, std::size_t N\u003e struct array;\n```\n`std::array` is a container that encapsulates fixed size arrays. \n\n```cpp\nstd::array\u003cint, 4\u003e iarray1{ {5, 2, 3, 7} };\nstd::sort(iarray1.begin(), iarray1.end());\n\nfor (const auto\u0026 i : iarray1)\n    std::cout \u003c\u003c i \u003c\u003c ' ';\nstd::cout \u003c\u003c std::endl;\n\nstd::array\u003cint, 3\u003e iarray2 = { 7, 11, 13 };\nstd::ranges::reverse_copy(iarray2, std::ostream_iterator\u003cint\u003e(std::cout, \" \"));\nstd::cout \u003c\u003c std::endl;\nreturn 0;\n```\noutputs:\n\n```powershell\n2 3 5 7\n13 11 7\n...exited with code 0 (0x0).\nPress any key to close this window . . .\n```\n\n---\n\n### [Forward List](https://cppreference.com/w/cpp/container/forward_list.html)\n\n---\n\n### [Inplace Vector](https://cppreference.com/w/cpp/container/inplace_vector.html)\n\n---\n---\n\n[🔼 Back to top](#awesome-c-programming-language-)\n\n## Pointers and References\n\n### [Smart Pointers](https://wikipedia.org/wiki/Smart_pointer)\nSmart pointers enable automatic, exception-safe, object lifetime management.\n\n---\n\n#### [unique_ptr](https://cppreference.com/w/cpp/memory/unique_ptr.html)\n`std::unique_ptr` is a smart pointer that owns (**is responsible for**) and manages another object via a pointer and subsequently disposes of that object when the unique_ptr goes out of scope.\n\n```cpp\n{\n    unique_ptr\u003cClassName\u003e uptr(new ClassName);\n    uptr -\u003e method_name();\n    //....using\n} //destructing uptr destroys the ClassName object.\n```\n\n---\n\n#### [shared_ptr](https://cppreference.com/w/cpp/memory/shared_ptr.html)\n\n---\n\n#### [weak_ptr](https://cppreference.com/w/cpp/memory/weak_ptr.html)\n\n---\n---\n\n## [Expressions](https://cppreference.com/w/cpp/language/expressions.html)\n\n---\n\n### [Lambda Expressions](https://cppreference.com/w/cpp/language/lambda.html)\n\n[**`Lambda expression`**](https://wikipedia.org/wiki/Anonymous_function) in computer programming, also called an anonymous function, is a defined function not bound to an identifier.\n\n```cpp\nauto make_function(int\u0026 iparam)\n{\n    return [\u0026] { std::cout \u003c\u003c iparam \u003c\u003c std::endl; };\n}\n\nint main()\n{\n    int ival = 2;\n    auto f = make_function(ival); // the use of iparam in f binds directly to ival\n    f();\n    \n    ival = 3;\n    f();\n    return 0;\n}\n```\n\n---\n\n### [Value Categories](https://cppreference.com/w/cpp/language/value_category.html)\n\n- a `glvalue` (\"generalized\" lvalue) is an expression whose evaluation determines the identity of an object or function.\n- a `prvalue` (\"pure\" rvalue) is an expression whose evaluation.\n- an `xvalue` (an \"eXpiring\" value) is a glvalue that denotes an object whose resources can be reused.\n- an `lvalue` is a glvalue that is not an xvalue.\n\n---\n\n#### [lvalue](https://wikipedia.org/wiki/Value_(computer_science)#lrvalue)\n\nSome programming languages use the idea of l-values and r-values, deriving from the typical mode of evaluation on the left and right-hand side of an assignment statement. An l-value refers to an object that persists beyond a single expression. An r-value is a temporary value that does not persist beyond the expression that uses it.\n\n```cpp\nvoid foo();\nint main() {\n    int ivala; // Expression 'ivala' is lvalue\n    int \u0026ivalb{ivala}; // Expression 'ivalb' is lvalue\n\n    // Expression 'foo' is lvalue\n    // address may be taken by built-in address-of operator\n    void (*ptrfoo)() = \u0026foo;\n```\n\n---\n\n#### rvalue\n\n---\n\n#### glvalue\na glvalue (`\"generalized\"` lvalue) is an expression whose evaluation determines the identity of an object or function.\n\n---\n\n#### prvalue\n\n---\n\n#### xvalue\n\n---\n---\n\n[🔼 Back to top](#awesome-c-programming-language-)\n\n## [Class](https://cppreference.com/w/cpp/language/classes.html)\n\n### class/struct types\n\n### union types\n\n### Injected-class-name\n\n### Class property specifiers (C++26)\n\n### Members\n#### Data members\n#### Static members\n#### The this pointer\n#### Nested classes\n#### Member templates\n#### Bit-fields\n#### using-declarations\n#### Member functions\n#### Member access specifiers\n#### Constructors and member initializer lists\n#### Default member initializer (C++11)\n#### `friend` specifier\n#### `explicit` specifier\n#### `Converting` constructor\n\n### Special member functions\n#### `Default constructor`\n#### `Copy constructor`\n#### `Move constructor` (C++11)\n#### `Copy assignment` operator\n#### `Move assignment` operator (C++11)\n#### `Destructor`\n\n### Inheritance\n\n#### Base and derived classes\n#### Empty base optimization (EBO)\n#### Virtual member functions\n#### Pure virtual functions and abstract classes\n#### override specifier (C++11)\n#### final specifier (C++11)\n\n---\n---\n\n## Multithreading\n\n---\n---\n\n[🔼 Back to top](#awesome-c-programming-language-)\n\n## [Template Metaprogramming](https://wikipedia.org/wiki/Template_metaprogramming)\n* [Variadic Template](https://wikipedia.org/wiki/Variadic_template)\n* [Expression Templates](https://wikipedia.org/wiki/Expression_templates)\n* [Compile-Time Function Execution](https://wikipedia.org/wiki/Compile-time_function_execution)\n\n---\n---\n\n[🔼 Back to top](#awesome-c-programming-language-)\n\n## Exception Handling\n\n---\n---\n\n## Functions\n\n### [Coroutines](https://cppreference.com/w/cpp/language/coroutines.html)\nA coroutine is a function that can suspend execution to be resumed later. Coroutines are **stackless**: they suspend execution by returning to the caller, and the data that is required to resume execution is stored separately from the stack. This allows for sequential code that executes asynchronously (`e.g. to handle non-blocking I/O without explicit callbacks`), and also supports algorithms on lazy-computed infinite sequences and other uses.\n\n---\n---\n\n## Type Casting\n\n### [static_cast](https://cppreference.com/w/cpp/language/static_cast.html)\nConverts between types using a combination of implicit and user-defined conversions.\n\n---\n\n### [dynamic_cast](https://cppreference.com/w/cpp/language/dynamic_cast.html)\nSafely converts pointers and references to classes up, down, and sideways along the inheritance hierarchy.\n\n---\n\n### [const_cast](https://cppreference.com/w/cpp/language/const_cast.html)\nConverts between types with different cv-qualification.\n\n---\n\n### [reinterpret_cast](https://cppreference.com/w/cpp/language/reinterpret_cast.html)\n\n---\n---\n\n[🔼 Back to top](#awesome-c-programming-language-)\n\n## [Idioms](https://wikipedia.org/wiki/Programming_idiom)\n\n### [RAII](https://wikipedia.org/wiki/Resource_acquisition_is_initialization) (_Resource acquisition is initialization_)\nResource Acquisition Is Initialization or RAII, is a C++ programming technique which binds the life cycle of a resource that must be acquired before use (_allocated heap memory, thread of execution, open socket, open file, locked mutex, disk space, database connection—anything that exists in limited supply_) to the lifetime of an object. RAII guarantees that the resource is available to any function that may access the object. It also guarantees that all resources are released when the lifetime of their controlling object ends, in reverse order of acquisition.\n\n---\n\n### [PIMPL](https://cppreference.com/w/cpp/language/pimpl.html) (_Pointer to Implementation_)\n**`\"Pointer to implementation\"`** or `\"pImpl\"` is a C++ programming technique that removes implementation details of a class from its object representation by placing them in a separate class, accessed through an opaque pointer. The PIMPL idiom is used to:\n- hide implementation details from the header,\n- reduce compile-time dependencies,\n- provide binary compatibility,\n- keep your class ABI stable.\n\n```cpp\n#ifndef WIDGET_H\n#define WIDGET_H\n\n#include \u003cmemory\u003e\n\nclass Widget {\npublic:\n    Widget();\n    ~Widget();               // needs custom destructor declaration\n\n    void doSomething();\n    int getValue() const;\n\nprivate:\n    class Impl;              // Forward declaration\n    std::unique_ptr\u003cImpl\u003e p; // Pointer to implementation\n};\n\n#endif\n```\n\n- Widget::Impl is only forward-declared here.\n- std::unique_ptr is preferred; no manual memory management.\n- The header is clean and doesn’t expose internal details.\n\n```cpp\n#include \"widget.h\"\n#include \u003ciostream\u003e\n\n// Definition of the hidden implementation class\nclass Widget::Impl {\npublic:\n    void doInternalStuff() {\n        std::cout \u003c\u003c \"Doing internal stuff...\\n\";\n    }\n\n    int value = 42;  // Some internal data\n};\n\n// Public API\nWidget::Widget()\n    : p(std::make_unique\u003cImpl\u003e())\n{\n}\n\nWidget::~Widget() = default;   // Destructor in .cpp due to incomplete type\n\nvoid Widget::doSomething() {\n    p-\u003edoInternalStuff();\n}\n\nint Widget::getValue() const {\n    return p-\u003evalue;\n}\n```\nBuild a Static Library (**libwidget.a**)\n\n```bash\ng++ -std=c++17 -c widget.cpp -o widget.o\n```\nBuild a Shared Library (**libwidget.so**)\n```bash\ng++ -std=c++17 -fPIC -c widget.cpp -o widget.o\n```\n- Widget's header only contains the public API, so internal fields/methods don’t leak.\n- Widget::Impl is defined in the .cpp file, not exposed to users.\n- Changing private data or logic does not require recompiling code that includes widget.h.\n\n```cpp\n#include \"widget.h\"\n#include \u003ciostream\u003e\n\nint main() {\n    Widget w;\n    w.doSomething();\n    std::cout \u003c\u003c \"Value = \" \u003c\u003c w.getValue() \u003c\u003c \"\\n\";\n}\n```\n\nUser compiles and links with the `Static Library`\n```bash\ng++ -std=c++17 main.cpp -L. -lwidget -o app.out\n```\n\nUser compiles and links using the `Shared Library`\n```bash\ng++ -std=c++17 main.cpp -L. -lwidget -o app.out\n```\n\nEnsure the runtime loader can find libwidget.so\n```bash\nLD_LIBRARY_PATH=. ./app.out\n```\nOr install it to a system directory like /usr/local/lib.\n\n---\n\n### [CRTP](https://wikipedia.org/wiki/Curiously_recurring_template_pattern) (_Curiously recurring template pattern_)\n\n---\n\n### [Erase-Remove](https://wikipedia.org/wiki/Erase%E2%80%93remove_idiom)\n\n---\n\n### [Copy on Write](https://wikipedia.org/wiki/Copy-on-write)\n\n---\n\n### [Rule of N](https://cppreference.com/w/cpp/language/rule_of_three.html)\n\n---\n\n#### [The Rule of Three](https://wikipedia.org/wiki/Rule_of_three_(C%2B%2B_programming))\nThe `Rule of Three in C++ says`: If a class manages a resource (_e.g., raw new-allocated memory, file handle, socket_), and you need to define any one of these:\n* Destructor\n* Copy constructor\n* Copy assignment operator\n\n---\n\n#### The Rule of Five\nThe Rule of Five (C++11 and later) extends the Rule of Three.\nIf your class manages a resource (_e.g., heap memory, file descriptors, sockets, mutexes_), and you define any of the special member functions, you typically need to implement all five:\n* Destructor\n* Copy constructor\n* Copy assignment operator\n* Move constructor\n* Move assignment operator\n\n---\n\n#### The Rule of Zero\nIf your class doesn’t manage resources directly (no raw new/delete, no manual file handles, etc.), you don’t need to write any of the special member functions (_destructor, copy/move ctor, copy/move assignment_).\n\n---\n\n### [SFINAE](https://wikipedia.org/wiki/Substitution_failure_is_not_an_error) (_Substitution failure is not an error_)\n\n```cpp\n// Primary template: enabled only if T::size() is valid\ntemplate \u003ctypename T\u003e\nauto print_size(const T\u0026 x, int)\n-\u003e decltype(x.size(), void())   //SFINAE - based return type checks. Try to evaluate x.size()\n                                //If x.size() is valid -\u003e the whole expression becomes void\n                                //If x.size() is NOT valid -\u003e substitution fails -\u003e SFINAE kicks in\n{\n    std::cout \u003c\u003c \"x.size() = \" \u003c\u003c x.size() \u003c\u003c \"\\n\";\n}\n\n// Fallback overload: used if above substitution fails\ntemplate \u003ctypename T\u003e\nvoid print_size(const T\u0026, ...)   // ellipsis = lowest priority match\n{\n    std::cout \u003c\u003c \"No size() available.\\n\";\n}\nint main() {\n    std::vector\u003cint\u003e ivec{ 2, 3, 5, 7, 11 };\n    std::string str = \"Hello World!.\";\n    int ival = 42;\n\n    print_size(ivec, 0);   // has size() -\u003e prints size\n    print_size(str, 0);    // has size() -\u003e prints size\n    print_size(ival, 0);   // no size() -\u003e fallback\n    return 0;\n}\n```\n\n---\n---\n\n## Specifiers\n\n---\n\n### Typedef\n\n---\n\n### [Inline](https://cppreference.com/w/cpp/language/inline.html)\n\nThe **inline** specifier, when used in a function's decl-specifier-seq, declares the function to be an inline function. A function defined entirely inside a class/struct/union definition, whether it's a member function or a non-member friend function, is implicitly an inline function unless it is attached to a named module (`since C++20`)\n\n---\n\n### [Virtual Function Specifier](https://cppreference.com/w/cpp/language/virtual.html)\n\n---\n\nSpecifies that a non-static member function is **virtual** and `supports dynamic dispatch`. It may only appear in the decl-specifier-seq of the initial declaration of a non-static member function\n\n---\n\n### Explicit Function Specifier\n\n---\n\n### [Friend](https://cppreference.com/w/cpp/language/friend.html)\n\nThe `friend` declaration appears in a class body and grants a function or another class access to private and protected members of the class where the friend declaration appears.\n\n* Friend Function Example\n    ```cpp\n    class Point2D {\n    private:\n        int x, y;\n    \n    public:\n        Point2D(int x, int y) : x(x), y(y) {}\n    \n        // Friend function can access private members\n        friend void printPoint(const Point2D \u0026p);\n    };\n    \n    void printPoint(const Point2D \u0026p) {\n        std::cout \u003c\u003c \"Point(\" \u003c\u003c p.x \u003c\u003c \", \" \u003c\u003c p.y \u003c\u003c \")\\n\";\n    }\n    \n    int main() {\n        Point2D p(3, 4);\n        printPoint(p);   // friend function can access\n    }\n    ```\n\n* Friend Class Example\n\n    ```cpp\n    class Engine {\n    private:\n        int hp = 100;\n        // Car can access private members of Engine\n        friend class Car;\n    public:\n        Engine() = default;\n    };\n    \n    class Car {\n    public:\n        void showEnginePower(const Engine\u0026 e) {\n            std::cout \u003c\u003c \"Engine horsepower: \" \u003c\u003c e.hp \u003c\u003c \"\\n\";\n        }\n    };\n    \n    int main() {\n        Engine eW;\n        Car cW;\n        cW.showEnginePower(eW);\n        return 0;\n    }\n    ```\n\n---\n---\n\n## Compile Time Specifiers\n\n### Constexpr (C++11)\n\nThe **`constexpr`** specifier declares that it is possible to evaluate the value of the entities at `compile time`. \n```cpp\nconstexpr int factorial(int n) {\n    return n \u003c= 1 ? 1 : (n * factorial(n - 1));\n}\n```\n![constexpr](/.assets/constexpr.png)\n\n```cpp\nconstexpr int fac5 = factorial(5);\nstatic constexpr int const\u0026 fac10 = 3628800;\nstatic_assert(fac10 == factorial(10), \"factorial failed\\n\");\n```\n\n---\n\n### [Consteval](https://cppreference.com/w/cpp/language/consteval.html) (C++20)\n\n---\n\n### [Constinit](https://cppreference.com/w/cpp/language/constinit.html) (C++20)\n\n---\n---\n\n[🔼 Back to top](#awesome-c-programming-language-)\n\n## Language Concepts\n\n### [auto](https://cppreference.com/w/cpp/language/auto.html) (_Automatic Type Deduction_)\n\n**`auto`** tells the compiler: \"`Deduce the variable's type automatically from the initializer.`\"\n\n* Iterators (most common)\n```cpp\nstd::vector\u003cint\u003e v = {2,3,5};\nauto it = v.begin();  // replaces vector\u003cint\u003e::iterator\n```\n* Lambda functions\n```cpp\nauto printType = [](auto t) { std::cout \u003c\u003c typeid(t).name() \u003c\u003c std::endl; };\n```\n\n* Range-based loops \n```cpp\nstd::vector\u003cint\u003e ivec = {2,3,5};\nfor (auto v : ivec) {\n    std::cout \u003c\u003c v \u003c\u003c std::endl;\n}\n```\n\n* Working with templates\n```cpp\ntemplate \u003ctypename T\u003e\nvoid printType(T param) {\n    std::cout \u003c\u003c typeid(param).name() \u003c\u003c std::endl;\n}\n```\n\n### ADL (_Argument Dependent Lookup_)\n\n---\n\n### [Name Mangling](https://wikipedia.org/wiki/Name_mangling)\n\n---\n\n### [RTTI](https://wikipedia.org/wiki/Run-time_type_information) (_Run-time type information_) \n\n---\n\n### [Virtual Methods](https://wikipedia.org/wiki/Virtual_function)\nVirtual functions enable `runtime polymorphism` (dynamic dispatch). When you call a virtual function through a base class pointer or reference, C++ decides at runtime which overridden function to execute based on the actual (dynamic) type of the object.\n\n```cpp\nstruct Basev1 {\n    void speak() { cout \u003c\u003c \"Base v1 speaks\\n\"; }  // NOT virtual\n};\n\nstruct Derivedv1 : Basev1 {\n    void speak() { cout \u003c\u003c \"Derived v1 speaks\\n\"; } // hides Base::speak\n};\n\nstruct Basev2 {\n    virtual void speak() { cout \u003c\u003c \"Base v2 speaks\\n\"; }  // virtual\n};\n\nstruct Derivedv2 : Basev2 {\n    void speak() override { cout \u003c\u003c \"Derived v2 speaks\\n\"; } // override\n};\n\nint main() {\n    Derivedv1 dv1;\n    Basev1* ptrv1 = \u0026dv1;    // base pointer to a derived object\n    ptrv1-\u003espeak();      // calls Base::speak (static dispatch)\n    \n    /*-------------------------------*/\n    Derivedv2 dv2;\n    Basev2* ptrv2 = \u0026dv2;\n    ptrv2-\u003espeak();      // calls Derived::speak (dynamic dispatch)\n\n    return 0;\n}\n```\n\n### [Virtual Tables](https://wikipedia.org/wiki/Virtual_method_table)\n\n---\n\n### [Forward Declaration](https://wikipedia.org/wiki/Forward_declaration)\n* Basic Forward Declaration of `a Class`\n   \n    ```cpp\n    #include \u003ciostream\u003e\n    \n    // Forward declaration\n    class Engine;\n    \n    class Car {\n    public:\n        void run(Engine* en); // OK: pointer doesn't require full definition\n    };\n    \n    // Full definition of Engine\n    class Engine {\n    public:\n        void print_spec() { std::cout \u003c\u003c \"Engine Spec:..\\n\"; }\n    };\n    \n    void Car::run(Engine* e) {\n        e-\u003eprint_spec(); // OK now, since Engine is fully defined\n    }\n    \n    int main() {\n        Car c1;\n        Engine e1;\n        c1.run(\u0026e1);\n        return 0;\n    }\n    ```\n* Forward Declaration of `Functions`\n    ```cpp    \n    void foo(); // forward declaration\n    \n    void bar() {\n        foo();  // valid because foo is declared\n    }\n    \n    void foo() {\n        bar();\n    }\n    int main() {\n        foo();\n        bar();\n        return 0;\n    }\n    ```\n### [Special Member Functions](https://wikipedia.org/wiki/Special_member_functions)\n* (Default) Constructor:\n* Copy Constructor:\n* Move Constructor:\n* Copy Assignment Operator:\n* Move assignment Operator:\n* Destructor:\n\nSignatures of the special member functions:\n\n| Function                 | Syntax for class `MyClass`                              |\n|--------------------------|----------------------------------------------------------|\n| (Default) constructor    | `MyClass();`                                             |\n| Copy constructor         | `MyClass(const MyClass\u0026 other);`                         |\n| Move constructor         | `MyClass(MyClass\u0026\u0026 other) noexcept;`                     |\n| Copy assignment operator | `MyClass\u0026 operator=(const MyClass\u0026 other);`              |\n| Move assignment operator | `MyClass\u0026 operator=(MyClass\u0026\u0026 other) noexcept;`          |\n| Destructor               | `virtual ~MyClass();`                                    |\n\n---\n---\n\n## [Concurrency](https://wikipedia.org/wiki/Concurrency_(computer_science)) \u0026 [Parallelism](https://wikipedia.org/wiki/Parallel_computing) \u0026 [Multithreading](https://wikipedia.org/wiki/Multithreading_(computer_architecture))\n\n---\n---\n\n## Framework and Libraries\n\n### [Algorithm](https://cppreference.com/w/cpp/algorithm.html)\n\n| Category | Description | Reference |\n|---------|-------------|-------------------|\n| **Non‑modifying sequence operations** | Algorithms that read but do not change data | [Non‑modifying](https://cppreference.com/w/cpp/algorithm.html#Non-modifying_sequence_operations) |\n| modifying sequence operation | Algorithms that modify elements | [Modifying](https://cppreference.com/w/cpp/algorithm#Modifying_sequence_operations) | **Copy / Move operations** | copy, move, copy_if, copy_n, move_backward… | [Copy / Move](https://cppreference.com/w/cpp/algorithm) |\n| **Swap operations** | swap, iter_swap, swap_ranges | [Swap operations](https://cppreference.com/w/cpp/algorithm.html#Swap_operations) |\n| **Transformation operations** | replace, replace_if, transform | [Transformation](https://cppreference.com/w/cpp/algorithm#Transformation_operations) |\n| **Generation operations** | fill, fill_n, generate, generate_n | [Generation](https://cppreference.com/w/cpp/algorithm#Generation_operations) |\n| **Removing operations** | remove, remove_if, unique, unique_copy | [Removing](https://cppreference.com/w/cpp/algorithm#Removing_operations) |\n| **Order‑changing operations** | reverse, rotate, shuffle, shift_left… | [Order‑changing](https://cppreference.com/w/cpp/algorithm#Order-changing_operations) | Random sampling | [sample](https://cppreference.com/w/cpp/algorithm.html) |\n| **Partitioning operations** | partition, is_partitioned, partition_point | [Partitioning](https://cppreference.com/w/cpp/algorithm#Partitioning_operations) |\n| **Sorting operations** | sort, stable_sort, partial_sort, nth_element | [Sorting](https://cppreference.com/w/cpp/algorithm#Sorting_operations) |\n| **Binary search operations** | lower_bound, upper_bound, equal_range | [Binary search](https://cppreference.com/w/cpp/algorithm#Binary_search_operations_.28on_partitioned_ranges.29) | set_union, set_intersection, set_difference | [Set operations](https://cppreference.com/w/cpp/algorithm#Set_operations_on) operations (sorted ranges)** | merge, inplace_merge | [Merge](https://cppreference.com/w/cpp/algorithm#Merge_operations) operations** | make_heap, push_heap, pop_heap, sort_heap | [Heap](https://cppreference.com/w/cpp/algorithm##Heap_operations) |\n| **Min/Max operations** | min, max, clamp, minmax_element | [Min/Max](https://cppreference.com/w/cpp/algorithm#Minimum.2Fmaximum_operations) | lexicographical_compare, compare_three_way | [Lexicographical compare](https://cppreference.com/w/cpp/algorithm#Lexicographical_comparison_operations) | next_permutation, prev_permutation | [Permutation](https://cppreference.com/w/cpp/algorithm#Permutation_operations) |\n| **Numeric operations** | iota, inner_product, reduce, transform_reduce | [Numeric Operations](https://cppreference.com/w/cpp/algorithm#Numeric_operations)\n| **Uninitialized memory ops** | uninitialized_copy, uninitialized_fill… | [Uninitialized memory](https://cppreference.com/w/cpp/algorithm#Operations_on_uninitialized_memory) |\n| **C library algorithms** | qsort, bsearch | [C library algorithms](https://cppreference.com/w/cpp/algorithm#C_library) |\n\n\n### Testing and Mocking Framework\n- [Catch2](https://github.com/catchorg/Catch2) - A modern, C++ native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later.\n- [Google Test](https://github.com/google/googletest) - [Google](https://google.github.io/googletest/) Testing and Mocking Framework\n\n---\n\n### Network\n- [POCO](https://github.com/pocoproject/poco) - The [POCO C++](https://pocoproject.org/) Libraries are powerful cross-platform open-source C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.\n\n---\n\n### RPC (_Remote Procedure Call_)\n- [gRPC](https://github.com/grpc/grpc) - A high performance, open source universal [RPC framework](https://grpc.io/docs/languages/cpp/quickstart/).\n\n---\n\n## Performance Analysis and Debugging Tool\n- [Orbit](https://github.com/google/orbit) - Orbit is a standalone profiler and debugging tool for Windows and Linux. Its main purpose is to help developers understand and visualize the execution flow of a complex application.\n- [Tracy Profiler](https://github.com/wolfpld/tracy) - A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling [profiler](https://tracy.nereid.pl/) for games and other applications.\n\n---\n---\n\n## Package Managers\n- [vcpkg](https://github.com/microsoft/vcpkg) - [vcpkg](https://vcpkg.io/) is a free C/C++ package manager for acquiring and managing libraries.\n- [Conan](https://github.com/conan-io/conan) - The open-source C and C++ package [manager](https://conan.io/).\n\n---\n---\n\n[🔼 Back to top](#awesome-c-programming-language-)\n\n## Severals\n- [Doxygen](https://doxygen.nl/) -  Doxygen is a widely-used documentation generator tool in software development.\n- [{fmt}](https://github.com/fmtlib/fmt) - A modern formatting [library](https://fmt.dev/).\n- [JSON for Modern C++](https://github.com/nlohmann/json) - [JSON](https://json.nlohmann.me/) for Modern C++.\n- [pybind11](https://github.com/pybind/pybind11) - Seamless [operability](https://pybind11.readthedocs.io/en/stable/) between C++11 and Python.\n- [spdlog](https://github.com/gabime/spdlog) - Fast C++ logging library.\n\n---\n---\n\n[🔼 Back to top](#awesome-c-programming-language-)\n\n## Standarts\n\n### [C++17](https://wikipedia.org/wiki/C%2B%2B17) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiUQgR_mRQUqaaqMr0dqOMx9\u0026si=eeZgwJukCid0gg_I)\n\n---\n\n#### [std::variant](https://cppreference.com/w/cpp/utility/variant.html)\n\n---\n\n#### [std::basic_string_view](https://cppreference.com/w/cpp/string/basic_string_view.html)\n\n---\n\n#### [std::any](https://cppreference.com/w/cpp/utility/any.html)\n\n---\n\n### [C++20](https://wikipedia.org/wiki/C%2B%2B20) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiVw5A7UAF80nrGjqa4YHH5V\u0026si=Qs-HYOl3nWr1aW_S)\n\n---\n\n#### [Modules](https://cppreference.com/w/cpp/language/modules.html)\n\n---\n\n#### [std::atomic_ref](https://cppreference.com/w/cpp/atomic/atomic_ref.html)\n\n---\n\n#### [std::barrier](https://cppreference.com/w/cpp/thread/barrier.html)\n\n---\n\n#### [std::jthread](https://cppreference.com/w/cpp/thread/jthread.html)\n\n---\n\n#### [std::latch](https://cppreference.com/w/cpp/thread/latch.html)\n\n---\n\n### [C++23](https://wikipedia.org/wiki/C%2B%2B23) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiUDgZNWp3jEfVCekz3zyqlR\u0026si=9ydOxTrqNAMecWHX)\n\n---\n\n#### [std::generator](https://cppreference.com/w/cpp/coroutine/generator.html)\n\n---\n\n#### [std::mdspan](https://cppreference.com/w/cpp/container/mdspan.html)\n\n---\n\n### [C++26](https://wikipedia.org/wiki/C%2B%2B26) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiUMnYOdxU8Qyl58Y8d65csM\u0026si=UT8y6spBSphgR1le)\n\n---\n\n#### [Contracts](https://cppreference.com/w/cpp/language/contracts.html)\n\n---\n---\n\n## Compiler/Debugger\n- [MSVC \u0026 GCC \u0026 Clang](https://github.com/cybersecurity-dev/PowerShell-Toolkit/#install-c-cpp) - installation step of MSVC/GCC/Clang compiler in **Windows**\n- [GCC \u0026 Clang](https://github.com/cybersecurity-dev/Bash-Toolkit/#install-c-cpp) - installation step of GCC/Clang compiler in **Linux**\n- [OnlineGDB](https://www.onlinegdb.com/) - **Online** compiler and debugger for C/C++\n\n##\n\n### My Other Awesome Lists\nYou can access the my other awesome lists [here](https://cyberthreatdefence.com/my_awesome_lists)\n\n### Contributing\n[Contributions of any kind welcome, just follow the guidelines](contributing.md)!\n\n### Contributors\n[Thanks goes to these contributors](https://github.com/cybersecurity-dev/awesome-cpp-programming-language/graphs/contributors)!\n\n[🔼 Back to top](#awesome-c-programming-language-)\n","created_at":"2025-08-05T22:56:11.139Z","updated_at":"2026-04-14T18:00:20.574Z","primary_language":null,"list_of_lists":false,"displayable":true,"categories":["Compiler/Debugger","Framework and Libraries","Package Managers","Severals","Performance Analysis and Debugging Tool","Pointers and References","[Template Metaprogramming](https://en.wikipedia.org/wiki/Template_metaprogramming)","Standarts","[Expressions](https://cppreference.com/w/cpp/language/expressions.html)","[Template Metaprogramming](https://wikipedia.org/wiki/Template_metaprogramming)","[Idioms](https://wikipedia.org/wiki/Programming_idiom)"],"sub_categories":["[C++26](https://wikipedia.org/wiki/C%2B%2B26) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiUMnYOdxU8Qyl58Y8d65csM\u0026si=UT8y6spBSphgR1le)","Testing and Mocking Framework","RPC (_Remote Procedure Call_)","Network","My Other Awesome Lists","[Smart Pointers](https://en.wikipedia.org/wiki/Smart_pointer)","[reinterpret_cast](https://en.cppreference.com/w/cpp/language/reinterpret_cast.html)","[C++17](https://en.wikipedia.org/wiki/C%2B%2B17) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiUQgR_mRQUqaaqMr0dqOMx9\u0026si=eeZgwJukCid0gg_I)","[C++20](https://en.wikipedia.org/wiki/C%2B%2B20) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiVw5A7UAF80nrGjqa4YHH5V\u0026si=Qs-HYOl3nWr1aW_S)","[C++23](https://en.wikipedia.org/wiki/C%2B%2B23) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiUDgZNWp3jEfVCekz3zyqlR\u0026si=9ydOxTrqNAMecWHX)","[C++26](https://en.wikipedia.org/wiki/C%2B%2B26) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiUMnYOdxU8Qyl58Y8d65csM\u0026si=UT8y6spBSphgR1le)","[Smart Pointers](https://wikipedia.org/wiki/Smart_pointer)","[C++17](https://wikipedia.org/wiki/C%2B%2B17) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiUQgR_mRQUqaaqMr0dqOMx9\u0026si=eeZgwJukCid0gg_I)","[C++20](https://wikipedia.org/wiki/C%2B%2B20) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiVw5A7UAF80nrGjqa4YHH5V\u0026si=Qs-HYOl3nWr1aW_S)","[C++23](https://wikipedia.org/wiki/C%2B%2B23) [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://youtube.com/playlist?list=PL9V4Zu3RroiUDgZNWp3jEfVCekz3zyqlR\u0026si=9ydOxTrqNAMecWHX)","[Lambda Expressions](https://cppreference.com/w/cpp/language/lambda.html)","[Value Categories](https://cppreference.com/w/cpp/language/value_category.html)","Inheritance","[Rule of N](https://cppreference.com/w/cpp/language/rule_of_three.html)","[Algorithm](https://cppreference.com/w/cpp/algorithm.html)"],"projects_url":"https://awesome.ecosyste.ms/api/v1/lists/cybersecurity-dev%2Fawesome-cpp-programming-language/projects"}