Track 02 · Intermediate · Free

C++ Intermediate

Own memory, templates and the object model like a systems engineer.

The layer that separates hobby code from production robotics code: RAII, smart pointers, move semantics, templates and a working mental model of the compiler.

Prerequisite: C++ Beginner, or comfort with classes, pointers and the STL.

Start course

You will be able to

  • Design leak-free types with RAII and smart pointers
  • Write move-aware classes that don't copy hot data
  • Build generic components with templates and concepts
  • Profile and remove real allocation hot spots

Lesson outline

01

Object lifetime & RAII

Scope, destructors, resource ownership as a type rule.

5hOpen lesson
02

Smart pointers

unique_ptr, shared_ptr, weak_ptr, ownership diagrams.

5hOpen lesson
03

Copy, move, rule of five

Value categories, move constructors, std::move pitfalls.

6hOpen lesson
04

Templates & concepts

Function and class templates, constraints, type traits.

6hOpen lesson
05

Error handling strategies

Exceptions vs expected, noexcept, error taxonomies.

5hOpen lesson
06

Threads & synchronisation

std::thread, mutex, atomics, data-race hunting.

6hOpen lesson
07

Performance & memory layout

Cache lines, reserve, small-buffer tricks, perf profiling.

5hOpen lesson
08

Build systems at scale

CMake targets, libraries, dependency hygiene.

4hOpen lesson

Project examples

PRJ-04

Lock-free telemetry ring

A fixed-capacity ring buffer with a producer thread and a consumer thread, benchmarked.

template <typename T, std::size_t N>
class RingBuffer {
  std::atomic<std::size_t> head_{0}, tail_{0};
public:
  bool push(T value) noexcept;
};
PRJ-05

Owned device handle

Wrap a fake serial device in a move-only RAII type that can never leak or double-close.

class Device {
  int fd_{-1};
public:
  Device(Device&&) noexcept;
  ~Device() { if (fd_ >= 0) ::close(fd_); }
};
PRJ-06

Generic trajectory interpolator

One templated interpolator that works for scalars, 2D points and 6-axis joint vectors.

template <Interpolatable P>
P lerp(const P& a, const P& b, double t);

Free course

Begin when you are ready.

7 weeks · ~6h/week. Curriculum aligned with the ISO C++ reference material and verified September 2026.

ISO C++ resources
Continue to C++ Advanced

Free enrollment · C++ Intermediate

Start learning

Leave your details and we'll send the setup guide and first lesson.

Free · no payment details