Bug 208715 - devel/pire: Fix build with libc++ 3.8.0
Summary: devel/pire: Fix build with libc++ 3.8.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dmitry Marakasov
Depends on:
Blocks: 208158
  Show dependency treegraph
Reported: 2016-04-11 18:35 UTC by Dimitry Andric
Modified: 2016-04-13 14:09 UTC (History)
0 users

See Also:
amdmi3: maintainer-feedback+

Fix std::map declaration in devel/pire (1.13 KB, patch)
2016-04-11 18:35 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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