Boost any usage

Posted by Ockonal on Stack Overflow See other posts from Stack Overflow or by Ockonal
Published on 2010-06-17T14:47:55Z Indexed on 2010/06/17 14:53 UTC
Read the original article Hit count: 206

Filed under:
|
|
|
|

Hello, how can I insert my own class objects into ptr_map from boost. The objects are templated so I can't use some static typename in the map. So I did:

ptr_map<string, any> someMap;

My class inherits the boost::noncopyable.

someMap.insert("Test", new MyClass());

The error is: error: no matching function for call to ‘boost::ptr_map.

© Stack Overflow or respective owner

Related posts about c++

Related posts about boost