An open API service indexing awesome lists of open source software.

https://github.com/kuro337/modern-cpp

Just a repo of good idiomatic C++ code snippets I tend to find useful.
https://github.com/kuro337/modern-cpp

cpp cpp14 cpp17 cpp21

Last synced: 4 months ago
JSON representation

Just a repo of good idiomatic C++ code snippets I tend to find useful.

Awesome Lists containing this project

README

          

```
███╗ ███╗ ██████╗ ██████╗ ███████╗██████╗ ███╗ ██╗ ██████╗██████╗ ██████╗
████╗ ████║██╔═══██╗██╔══██╗██╔════╝██╔══██╗████╗ ██║ ██╔════╝██╔══██╗██╔══██╗
██╔████╔██║██║ ██║██║ ██║█████╗ ██████╔╝██╔██╗ ██║ ██║ ██████╔╝██████╔╝
██║╚██╔╝██║██║ ██║██║ ██║██╔══╝ ██╔══██╗██║╚██╗██║ ██║ ██╔═══╝ ██╔═══╝
██║ ╚═╝ ██║╚██████╔╝██████╔╝███████╗██║ ██║██║ ╚████║ ╚██████╗██║ ██║
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝

```

# Modern C++

- Just a repo of good C++ code I write and find useful.


- My environment

- `g++ (GCC)`
- `Ubuntu 20.04.2 LTS`
- `Linux 5.8.0-53-generic x86_64`
- Mostly `C++17` and `C++20`
- Docker with `Ubuntu 20.04.2 LTS` and `g++ (GCC)` or `clang++ (LLVM)` for uniform build and deployments


- Reference build and run

```bash
# Development
g++ -std=c++20 -o quicksort quicksort.cpp && ./quicksort

# Production
g++ -std=c++20 -O3 -o quicksort quicksort.cpp && ./quicksort
```


- `huffmanEncoding.cpp` - implementation of Huffman Encoding in `C++20` using an `Unbalanced Binary Tree`, `std::map`, `std::priority_queue`, and `std::bitset`.