0
class EntityHolder { public: EntityHolder ( ) { } EntityHolder ( const EntityHolder& other ) { } ~EntityHolder ( ) { } EntityHolder& operator = ( const EntityHolder& other ) { return *this; } // = 

When I am trying to create boost:shared_ptr, I get the following error:

..\src\Entity.cpp:7:34: error: no matching function for call to 'boost::shared_ptr<orm::EntityHolder>::shared_ptr (orm::EntityHolder&)' 

What does this mean?

1
  • 2
    You should post the line in which you're trying to make the shared_ptr, i.e. the line that gives the error. Commented Nov 10, 2012 at 18:36

1 Answer 1

3

Looks like you're trying to pass an object of type EntityHolder directly to the constructor of the shared_ptr, but you're supposed to give it a pointer, like so:

boost::shared_ptr<EntityHolder> p(new EntityHolder); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.