/usr/include/c++/v1/map:837:5: error: static_assert failed "Allocator::value_type must be same type as value_type"

Dimitry Andric dim at FreeBSD.org
Tue Jun 14 21:15:01 UTC 2016


On 14 Jun 2016, at 06:05, Otacílio <otacilio.neto at bsd.com.br> wrote:
> 
> I'm getting this error when I try compile the ORB-SLAM2 library. Some one can give me a hint about it?
> 
> 
> /usr/include/c++/v1/map:837:5: error: static_assert failed "Allocator::value_type must be same type as value_type"
>    static_assert((is_same<typename allocator_type::value_type, value_type>::value),

Typically, this is because the allocator for std::map must use a const
key, and libc++ now checks for this with a static assertion.

See for example this fix for www/node:
https://svnweb.freebsd.org/ports/head/www/node/files/patch-deps_v8_src_compiler_instruction.h?view=markup&pathrev=412412

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20160614/4959f23b/attachment.sig>


More information about the freebsd-hackers mailing list