So conventionally the idea is that things like dynamic memory allocation, smart pointers, modern C++ abstraction and templates etc. is too "heavyweight" to use on 8 bit processors.
Not really true at all, here's the output from a smart pointer implementation I wrote using a custom embedded-appropriate memory allocation policy in straight C++11 for the AVR Mega series; this is the output over the hardware serial port from an ATMega328 to a PC terminal:
This is just some structs being allocated dynamically to a memory pool on the heap inside a function, managed by the lightweight smart pointer object on the stack, which then de-allocates the heap memory automatically when the smart pointer object goes out of scope as the function returns. The total codebase size is just under 1k SLOC, which compiles down to using about 5.5 kb of program memory space on the device. SRAM usage is dependent on the size of the pool/type of managed object