samedi 28 janvier 2017

How to pass std::experimental::optional of primitive type as function argument

I have optionals of primitive types and classes that contain only primitive types. Should I be passing these optionals by reference or by value. I am assuming the optional of a 8 byte primitive adds a bool to align by 16 bytes and should probably be passed by reference.

Aucun commentaire:

Enregistrer un commentaire