Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can sparse_hash_map support unique_ptr? #89

Open
cookieli opened this issue May 25, 2020 · 0 comments
Open

Can sparse_hash_map support unique_ptr? #89

cookieli opened this issue May 25, 2020 · 0 comments

Comments

@cookieli
Copy link

cookieli commented May 25, 2020

I have a class member like this:

HashMap<String, std::unique_ptr<Klass>> _classes;// HashMap is sparse_hash_map alias

And it will get following errors:

In file included from /usr/include/c++/7/memory:80:0,
                 from /home/lzx/LiVM/include/sparsepp/spp.h:53,
                 from /home/lzx/LiVM/include/shared/hashMap.h:7,
                 from /home/lzx/LiVM/include/LiVM/classpath/system.h:8,
                 from /home/lzx/LiVM/src/LiVM/classpath/system.cpp:4:
/usr/include/c++/7/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = LiVM::Klass]’:
blahblah

And when i change it to:

HashMap<String, Klass*> _classes;

everything is ok,so what happened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant