Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* I have a class template like such ... */
- template <typename T>
- class MyCollection
- {
- private:
- shared_ptr<T> col;
- public:
- MyCollection(shared_ptr<T> t) : col(t) {
- // ...
- }
- void operator()() { /* I want to call this */ }
- }
- // And I instantiate it like this ...
- mm = make_shared<MyMap>();
- MyCollection<MyMap> mc(mm);
- /* But what I'm wanting to do is call the functor (operator()), but this doesn't work ... */
- mc()
- Thoughts?
Advertisement
Add Comment
Please, Sign In to add comment