Bug 208715

Summary: devel/pire: Fix build with libc++ 3.8.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Some People Flags: amdmi3: maintainer-feedback+
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 208158    
Description Flags
Fix std::map declaration in devel/pire none

Description Dimitry Andric freebsd_committer 2016-04-11 18:35:10 UTC
Created attachment 169210 [details]
Fix std::map declaration in devel/pire

During the exp-run in bug 208158, it was found that devel/pire gives errors with libc++ 3.8.0 [1]:

In file included from classes.cpp:24:
In file included from ./stub/stl.h:36:
/usr/include/c++/v1/map:837:5: error: implicit instantiation of undefined template '__static_assert_test<false>'
    static_assert((is_same<typename allocator_type::value_type, value_type>::value),
/usr/include/c++/v1/__config:632:35: note: expanded from macro 'static_assert'
    typedef __static_assert_check<sizeof(__static_assert_test<(__b)>)> \
./stub/stl.h:101:21: note: in instantiation of template class 'std::__1::map<unsigned int, Pire::(anonymous namespace)::CharClassesTable::CharClass, std::__1::less<unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, Pire::(anonymous namespace)::CharClassesTable::CharClass> > >' requested here
        class ymap: public std::map<K, V, C, A> {

This is because the std::map's allocator is not defined properly.  Fix this by using 'const K' instead of just 'K'.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/pire-0.0.5_1.log
Comment 1 Dmitry Marakasov freebsd_committer 2016-04-13 14:09:00 UTC
Fixed, thank you. Also upstreamed.
Comment 2 commit-hook freebsd_committer 2016-04-13 14:09:52 UTC
A commit references this bug:

Author: amdmi3
Date: Wed Apr 13 14:08:57 UTC 2016
New revision: 413209
URL: https://svnweb.freebsd.org/changeset/ports/413209

  - Fix build with libc++ 3.8
  - Pet portlint
  - Clean up pkg-descr and update WWW

  PR:		208715
  Submitted by:	dim