[Boost-bugs] [Boost C++ Libraries] #10440: boyer_moore.hpp fails on Linux w/ gcc-4.7.2, OK with Mac clang

Subject: [Boost-bugs] [Boost C++ Libraries] #10440: boyer_moore.hpp fails on Linux w/ gcc-4.7.2, OK with Mac clang
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-09-02 03:51:37


#10440: boyer_moore.hpp fails on Linux w/ gcc-4.7.2, OK with Mac clang
-----------------------------------------+-----------------------
 Reporter: boost@… | Owner: marshall
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: algorithm
  Version: Boost 1.56.0 | Severity: Problem
 Keywords: boyer_moore,linux,gcc-4.7.2 |
-----------------------------------------+-----------------------
 I have a simple find-string-in-file program that uses boyer_moore
 matching. On Mac, it compiles and works OK. (Not sure if Mac is really
 using gcc; that's the command name, but "gcc -v" says "Apple LLVM version
 5.1 (clang-503.0.40) (based on LLVM 3.4svn)"

 At any rate, the same code, with a freshly-compiled Boost-1.56.0 on Debian
 7, gcc-4.7.2, fails to compile:

 {{{
 g++ -g -I. -I/usr/local/include -c -o find.o find.cc
 In file included from /usr/local/include/boost/range/iterator.hpp:24:0,
                  from /usr/local/include/boost/range/begin.hpp:24,
                  from
 /usr/local/include/boost/algorithm/searching/boyer_moore.hpp:18,
                  from find.cc:5:
 /usr/local/include/boost/mpl/eval_if.hpp: In instantiation of ‘struct
 boost::mpl::eval_if_c<false, boost::range_const_iterator<const unsigned
 char*, void>, boost::range_mutable_iterator<const unsigned char*, void>
>’:
 /usr/local/include/boost/range/iterator.hpp:69:17: required from ‘struct
 boost::range_iterator<const unsigned char*, void>’
 /usr/local/include/boost/algorithm/searching/boyer_moore.hpp:243:5:
 required by substitution of ‘template<class PatternRange, class
 CorpusRange> typename boost::range_iterator<CorpusRange>::type
 boost::algorithm::boyer_moore_search(CorpusRange&, const PatternRange&)
 [with PatternRange = const unsigned char*; CorpusRange = const unsigned
 char*]’
 find.cc:26:106: required from here
 /usr/local/include/boost/mpl/eval_if.hpp:60:31: error: no type named
 â€˜type’ in ‘boost::mpl::eval_if_c<false, boost::range_const_iterator<const
 unsigned char*, void>, boost::range_mutable_iterator<const unsigned char*,
 void> >::f_ {aka struct boost::range_mutable_iterator<const unsigned
 char*, void>}’
 make: *** [find.o] Error 1
 }}}

 (On Mac also, I compiled a fresh copy of Boost-1.56.0 using the native
 compiler.)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10440>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC