#include <vector>
using namespace std;
class Foo;
int main()
{
vector<Foo* const> vec;
}
I2luY2x1ZGUgPHZlY3Rvcj4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNsYXNzIEZvbzsKCmludCBtYWluKCkKewogIHZlY3RvcjxGb28qIGNvbnN0PiB2ZWM7Cn0=
In file included from /usr/include/i386-linux-gnu/c++/4.9/bits/c++allocator.h:33:0,
from /usr/include/c++/4.9/bits/allocator.h:46,
from /usr/include/c++/4.9/vector:61,
from prog.cpp:1:
/usr/include/c++/4.9/ext/new_allocator.h: In instantiation of 'struct __gnu_cxx::new_allocator<Foo* const>':
/usr/include/c++/4.9/bits/allocator.h:92:11: required from 'class std::allocator<Foo* const>'
/usr/include/c++/4.9/bits/alloc_traits.h:85:43: required from 'struct std::allocator_traits<std::allocator<Foo* const> >'
/usr/include/c++/4.9/ext/alloc_traits.h:95:10: required from 'struct __gnu_cxx::__alloc_traits<std::allocator<Foo* const> >'
/usr/include/c++/4.9/bits/stl_vector.h:75:28: required from 'struct std::_Vector_base<Foo* const, std::allocator<Foo* const> >'
/usr/include/c++/4.9/bits/stl_vector.h:214:11: required from 'class std::vector<Foo* const>'
prog.cpp:8:22: required from here
/usr/include/c++/4.9/ext/new_allocator.h:93:7: error: 'const _Tp* __gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::const_reference) const [with _Tp = Foo* const; __gnu_cxx::new_allocator<_Tp>::const_pointer = Foo* const*; __gnu_cxx::new_allocator<_Tp>::const_reference = Foo* const&]' cannot be overloaded
address(const_reference __x) const _GLIBCXX_NOEXCEPT
^
/usr/include/c++/4.9/ext/new_allocator.h:89:7: error: with '_Tp* __gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::reference) const [with _Tp = Foo* const; __gnu_cxx::new_allocator<_Tp>::pointer = Foo* const*; __gnu_cxx::new_allocator<_Tp>::reference = Foo* const&]'
address(reference __x) const _GLIBCXX_NOEXCEPT
^
/usr/include/c++/4.9/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::deallocate(__gnu_cxx::new_allocator<_Tp>::pointer, __gnu_cxx::new_allocator<_Tp>::size_type) [with _Tp = Foo* const; __gnu_cxx::new_allocator<_Tp>::pointer = Foo* const*; __gnu_cxx::new_allocator<_Tp>::size_type = unsigned int]':
/usr/include/c++/4.9/bits/alloc_traits.h:383:9: required from 'static void std::allocator_traits<_Alloc>::deallocate(_Alloc&, std::allocator_traits<_Alloc>::pointer, std::allocator_traits<_Alloc>::size_type) [with _Alloc = std::allocator<Foo* const>; std::allocator_traits<_Alloc>::pointer = Foo* const*; std::allocator_traits<_Alloc>::size_type = unsigned int]'
/usr/include/c++/4.9/bits/stl_vector.h:178:37: required from 'void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(std::_Vector_base<_Tp, _Alloc>::pointer, std::size_t) [with _Tp = Foo* const; _Alloc = std::allocator<Foo* const>; std::_Vector_base<_Tp, _Alloc>::pointer = Foo* const*; std::size_t = unsigned int]'
/usr/include/c++/4.9/bits/stl_vector.h:161:33: required from 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = Foo* const; _Alloc = std::allocator<Foo* const>]'
/usr/include/c++/4.9/bits/stl_vector.h:257:15: required from 'std::vector<_Tp, _Alloc>::vector() [with _Tp = Foo* const; _Alloc = std::allocator<Foo* const>]'
prog.cpp:8:22: required from here
/usr/include/c++/4.9/ext/new_allocator.h:110:30: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
{ ::operator delete(__p); }
^
In file included from /usr/include/c++/4.9/ext/new_allocator.h:33:0,
from /usr/include/i386-linux-gnu/c++/4.9/bits/c++allocator.h:33,
from /usr/include/c++/4.9/bits/allocator.h:46,
from /usr/include/c++/4.9/vector:61,
from prog.cpp:1:
/usr/include/c++/4.9/new:132:6: note: initializing argument 1 of 'void operator delete(void*)'
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
^