What is the easiest way to initialize a vector in C++ with hardcoded elements, similar to array initialization?

Been working with C++ for a while, and honestly, I used to take the long route with push_back everywhere. But a few years back, I stumbled on initializer lists and never looked back. If you want to initialize vector C++ the clean way, just do this:

std::vector<int> ints = {10, 20, 30};

Reads just like an array and is much more readable. Way easier to manage, especially in larger codebases.