Skip to content

Instantly share code, notes, and snippets.

@mrvn
Last active January 11, 2019 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrvn/da7f2d7ce48561cadce71da56701373d to your computer and use it in GitHub Desktop.
Save mrvn/da7f2d7ce48561cadce71da56701373d to your computer and use it in GitHub Desktop.
strange c++ error
Compiling common/Socket.o
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33:0,
from /usr/include/c++/7/bits/allocator.h:46,
from /usr/include/c++/7/string:41,
from /source/brederlo/pkg/ql-soft/ql-mcast/git/src/common/Address.h:27,
from /source/brederlo/pkg/ql-soft/ql-mcast/git/src/common/packets.h:25,
from /source/brederlo/pkg/ql-soft/ql-mcast/git/src/common/Socket.h:27,
from /source/brederlo/pkg/ql-soft/ql-mcast/git/src/common/Socket.cc:22:
/usr/include/c++/7/ext/new_allocator.h: In instantiation of ‘class __gnu_cxx::new_allocator<const std::pair<const std::__cxx11::basic_string<char>, const int> >’:
/usr/include/c++/7/bits/allocator.h:108:11: required from ‘class std::allocator<const std::pair<const std::__cxx11::basic_string<char>, const int> >’
/usr/include/c++/7/bits/stl_vector.h:81:14: required from ‘struct std::_Vector_base<const std::pair<const std::__cxx11::basic_string<char>, const int>, std::allocator<const std::pair<const std::__cxx11::basic_string<char>, const int> > >::_Vector_impl’
/usr/include/c++/7/bits/stl_vector.h:166:20: required from ‘struct std::_Vector_base<const std::pair<const std::__cxx11::basic_string<char>, const int>, std::allocator<const std::pair<const std::__cxx11::basic_string<char>, const int> > >’
/usr/include/c++/7/bits/stl_vector.h:216:11: required from ‘class std::vector<const std::pair<const std::__cxx11::basic_string<char>, const int> >’
/source/brederlo/pkg/ql-soft/ql-mcast/git/src/common/Socket.cc:219:19: required from here
/usr/include/c++/7/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 = const std::pair<const std::__cxx11::basic_string<char>, const int>; __gnu_cxx::new_allocator<_Tp>::const_pointer = const std::pair<const std::__cxx11::basic_string<char>, const int>*; __gnu_cxx::new_allocator<_Tp>::const_reference = const std::pair<const std::__cxx11::basic_string<char>, const int>&]’ cannot be overloaded
address(const_reference __x) const _GLIBCXX_NOEXCEPT
^~~~~~~
/usr/include/c++/7/ext/new_allocator.h:89:7: error: with ‘_Tp* __gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::reference) const [with _Tp = const std::pair<const std::__cxx11::basic_string<char>, const int>; __gnu_cxx::new_allocator<_Tp>::pointer = const std::pair<const std::__cxx11::basic_string<char>, const int>*; __gnu_cxx::new_allocator<_Tp>::reference = const std::pair<const std::__cxx11::basic_string<char>, const int>&]’
address(reference __x) const _GLIBCXX_NOEXCEPT
^~~~~~~
/source/brederlo/pkg/ql-soft/ql-mcast/git/Makefile:71: recipe for target 'common/Socket.o' failed
make[1]: *** [common/Socket.o] Error 1
Makefile:29: recipe for target '_x86_64-linux-gnu' failed
make: *** [_x86_64-linux-gnu] Error 2
BoundSocket::BoundSocket(const std::vector<const std::pair<const std::string, const int> > & networks,
uint16_t port) : Socket(EPoll::IN_OUT_EDGE) {
for (auto p : networks) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment