This is a question about C++ that I got while coding an mbed application. I’m no expert at C++ and I don’t even know what terms to search on google.
This is my situation:
I created a class (lets call it Decoder) that I need to pass a Mail object to its constructor and it stores the reference in a private variable.
Mail objects are created using Mail<type, size>, so for now I use the same type and size inside the class definition like this:
Thanks Zoltan, yes that is better but I still have to write the size of the Mail in two locations, I would like to avoid that. I tried using a templated constructor and argument deduction but I could not figure how to declare the private _stMail using argument deduction.