Q:

Constructor Initializer List in C++

Please first look the code as follow: 
class StrBlob
{
    public:
        StrBlob();
        // ....
    private:
        std::shared_ptr<std::vector<std::string> > data;
}
//initializer empty into data ;

StrBlob::StrBlob()
// : data(std::make_shared<std::vector<std::string> >())      // compile success
{
 //  data(std::make_shared<std::vector<std::string> >());     // compile error
}
int main()
{
    // this statement can compile
    std::shared_ptr<std::vector<std::string> >data(std::make_shared<std::vector<std::string> >());
    return 0;
}

I want to know why the statement above  compiles occurs error? ?
error: no match for call to ‘(std::shared_ptr<std::vector<std::__cxx11::basic_string<char> > >)
   (std::shared_ptr<std::vector<std::__cxx11::basic_string<char> > >)’
   data(std::make_shared<std::vector<std::string> >());

corresponding knowledge quoted in C++Primer 5th (Chapter 7.5) as follows:

We can often, but not always , ignore the distinction between whether a member is initialized or assigned. Members that are const or references must be initialized. Similarly, members that are of a class type that does not define a default constructor also must be initialized

First I will share my thought.the 'data' member is default initialized before the constructor body starts executing. right? so,the 'data' member inside constructor will copy the object created from the function make_shared.right? 

A:

The first one compiles successfully because you initialize data in the member initializer list and such syntax is perfectly valid here. Check this for more information.
The second one is equal to data(...). It is not a constructing of data object, compiler sees it like an attempt of calling operator() for the data member which is already created (and it says about it in the error message).
Finally inside the main function you simply use shared_ptr copy constructor to create data from the shared_ptr returned by make_shared.

