In my project I have some functions like
std::tuple LoadWavefront(std::string filename);
That I can use lik
How do I get around that without having to std::get<> each item? Is there an elegant way to do this?
Return by value, instead of returning by "values" (which is what this std::tuple allows you to do).
API changes:
class Wavefront
{
public:
Wavefront(VAO v, Mesh m, ShaderProgram sp); // use whatever construction
// suits you here; you will
// only use it internally
// in the load function, anyway
const VAO& vao() const;
const Mesh& mesh() const;
const ShaderProgram& shader() const;
};
Wavefront LoadWavefront(std::string filename);