Can a std::string be assigned within a constructor?
<p>I have the following constructor:</p>

<pre><code> TCPConnector(int32_t fd, string ip, uint16_t port,
            vector&lt;uint32_t&gt;&amp; protocolChain, const Variant&amp; customParameters)
    : IOHandler(fd, IOHT_TCP_CONNECTOR) {
        _ip = ip;
        _port = port;
        _protocolChain = protocolChain;
        _closeSocket = true;
        _customParameters = customParameters;
    }
</code></pre>

<p>And I wanted to know whether or not a string (i.e. _ip) can be assigned safely within the constructor without explicitly initializing it?</p>
