title: Is there any method to pass protobuf object to shared_ptr?
body: <p>I want to copy protobuf msg &quot;SmConfig&quot; to an shared_ptr like below:</p>
  <pre><code>SignalMachine::SignalMachine(SmConfig* sm_config) {
    sm_config_ = std::make_shared&lt;SmConfig&gt;();
    sm_config_.CopyFrom(*sm_config);
  }
  
  class SignalMachine {
   private:
    std::shared_ptr&lt;SmConfig&gt; sm_config_;
  }
  </code></pre>
  <p>Because I need to keep SmConfig(protobuf) in &quot;class SignalMachine&quot;, I used the above method, is it reasonable? in fact, I did not find the corresponding description in the official document.</p>