Naming
I would rename initialize
because it's more of a setter. You can usually initialize an object only once (typically in the constructor), but there is no problem with calling initialize
twice
Accessing the object
There is no method to access the object. Maybe that's wanted because you are using friendship of some kind that you didn't paste? If that is the case, I highly recommend that you use the Attorney Client idiom if you are not already, so that your friend class/method can only access the m_Data
member and not the boolean
Additional features
There are some features you may (or may not) want to add:
- .get() method
- T&& constructor
- bool conversion operator
- indirection operator
- structure dereference operator
- 278
- 1
- 9