I have a case where I wish to store a list of resources in a std::vector. As I see it, my options are as follows:
- Give my resource a default constructor
- Store them as heap objects (and wrap them in a shared pointer)
Option 1 makes it possible to construct invalid resources and option 2 forces me to use the heap.
Am I missing any options here?