I have the following code:
class MarchingEvent
{
...
};
typedef std::list< std::shared_ptr<MarchingEvent> > Segment;
Can I do:
void myFunction(std::shared_ptr<MarchingEvent> A)
{
Segment segment;
segment.push_back( A ); // <- Questionable line.
}
Will my smart pointer be correctly incremented when pushing A to segment?
Aucun commentaire:
Enregistrer un commentaire