Skip to content

huangsam/cpp-trial

Repository files navigation

C++ Trial

GitHub Actions Workflow Status

Exploring modern C++ concepts (C++11 to C++20) with CMake and GoogleTest as development tools.

C++

Project goals

This repository serves as a comprehensive learning resource for modern C++ development, focusing on language mastery through C++11 to C++20 features, tool proficiency with CMake and GoogleTest, backend development patterns for systems programming, code quality with clean and testable C++ code, and progressive learning from basic concepts to advanced template metaprogramming.

Project Structure

The codebase is organized into domain-specific modules:

  • advanced/: Metaprogramming, lambdas, and factorial templates.
  • concurrency/: Threading, async programming, and synchronization structures.
  • memory/: Smart pointers, move semantics, and custom memory management.
  • oop/: Inheritance, polymorphism, and core class design.
  • stl/: Standard Template Library containers, algorithms, and file I/O.
  • types/: Primitive type safety, namespaces, and enums/unions.

For a guided learning path of C++ concepts in this project, refer to LESSONS.md.

Getting started

For everyone:

# Build with development mode
cmake --preset dev
cmake --build --preset dev

# Run application and tests
./build/bin/main.out
./build/bin/test.out

For performance engineers:

# Build with release mode
cmake --preset release
cmake --build --preset release

# Run benchmarks
./build/bin/bench/memory_bench.out
./build/bin/bench/concurrency_bench.out
./build/bin/bench/move_bench.out

For contributors:

# Ensure all files are formatted before PR
cmake --build build --target format

Helpful resources

About

Exploring Modern C++ ⛰️

Topics

Resources

Stars

Watchers

Forks

Contributors