In my project I have some functions like
std::tuple LoadWavefront(std::string filename);
That I can use lik
You could use boost::optional
:
boost::optional teapotVAO;
boost::optional teapotMesh;
boost::optional teapotShader;
std::tie(teapotVAO, teapotMesh, teapotShader)
= LoadWavefront("assets/teapot.obj");
Of course you'd have to change the way you access these values to always do *teapotVAO
, but at least the compiler will let you know if you mess up any of the access.