/PracticeCpp

Practice some modern or advanced C++ features and skills

Primary LanguageC++

PracticeCpp

Practicing some modern or advanced features and skills with some portable code snippets. Also collecting some best or good practices of cpp project.

## Content

  • singleton

  • lambda function

  • callback

  • chrono timer: use <chrono> to implement a timer to compute the time of a program cost.

  • diy: implement some toys of for study purpose

    • implementing smart ptr
      • unique_ptr
    • dsa: data structure and implementation
      • segment tree

Build

3rd-party libraries

This project uses catchorg/Catch2 as unittest framework, which is as a git submodule.

git clone --recurse-submodules https://github.com/charles-sun0v0/PracticeCpp 

Alternatively, the user could git clone this then cd 3rdparty and run git submodule init && git submodule update to fetch dependencies.

build with CMake

This project uses modern CMake concepts which is target-based.

cd <path-to-PracticeCpp>
cmake -S . -B build

Warning

The code is written for demonize or studying purpose without adequate tests. Therefore, it should not be applied to production directly.