prog.cpp: In function ‘int main()’:
prog.cpp:12:25: error: no matching function for call to ‘std::allocator<int []>::deallocate(int*&, int)’
allo.deallocate(ptr, 10);
^
prog.cpp:12:25: note: candidate is:
In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/c++allocator.h:33:0,
from /usr/include/c++/4.8/bits/allocator.h:46,
from /usr/include/c++/4.8/string:41,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from prog.cpp:1:
/usr/include/c++/4.8/ext/new_allocator.h:109:7: note: void __gnu_cxx::new_allocator<_Tp>::deallocate(__gnu_cxx::new_allocator<_Tp>::pointer, __gnu_cxx::new_allocator<_Tp>::size_type) [with _Tp = int []; __gnu_cxx::new_allocator<_Tp>::pointer = int (*)[]; __gnu_cxx::new_allocator<_Tp>::size_type = unsigned int]
deallocate(pointer __p, size_type)
^
/usr/include/c++/4.8/ext/new_allocator.h:109:7: note: no known conversion for argument 1 from ‘int*’ to ‘__gnu_cxx::new_allocator<int []>::pointer {aka int (*)[]}’