The initializer list is called at construction time to set variables that would otherwise be const. It's commonly used for const variables, references, etc. I don't actually know COM, but if the smart pointer has similar mechanics to a reference (i.e. once set it cannot be retargeted) then it will have to be initialized at construction time, using an initializer list.
Constructor() : _Ptr(new MyComObject)
{
// Other constructor stuff here
}
The syntax is probably wrong - as I said, I don't know COM - but this might be helpful?
EDIT:
Assuming you have the following class:
class MyClass
{
public:
MyClass(); // constructor
MyComPtr _ptr;
};
Then in your .cpp, define your constructor like this :
MyClass::MyClass() : _ptr(__uuidof(MyComClass)
{
// rest of constructor code
}