Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In file included from main.cpp:1:
- ./shared_ptr.h:13:18: warning: in-class initialization of non-static data member
- is a C++11 extension [-Wc++11-extensions]
- int count=0;
- ^
- ./shared_ptr.h:30:19: warning: instantiation of variable
- 'shared_ptr<int>::setOfPointers' required here, but no definition is
- available [-Wundefined-var-template]
- for(int i=0;i<setOfPointers.size();i++){
- ^
- main.cpp:4:21: note: in instantiation of member function
- 'shared_ptr<int>::shared_ptr' requested here
- shared_ptr<int> shp(new int(10));
- ^
- ./shared_ptr.h:16:38: note: forward declaration of template entity is here
- static std::vector< storage<T> > setOfPointers;
- ^
- 2 warnings generated.
- Undefined symbols for architecture x86_64:
- "shared_ptr<int>::setOfPointers", referenced from:
- shared_ptr<int>::shared_ptr(int*) in main-c9b010.o
- shared_ptr<int>::~shared_ptr() in main-c9b010.o
- ld: symbol(s) not found for architecture x86_64
- clang: error: linker command failed with exit code 1 (use -v to see invocation)
Add Comment
Please, Sign In to add comment