boostorg / heap

Boost.Heap
https://boost.org/libs/heap
18 stars 39 forks source link

Implicit dependency on <boost/mpl/if.hpp>? #12

Closed jbeich closed 6 years ago

jbeich commented 6 years ago

After https://github.com/boostorg/concept_check/pull/14 some consumers no longer build: asc, colmap, krita, osrm-backend. What's the path forward? CC @mjcaisse

#include <boost/heap/fibonacci_heap.hpp>

int main(void)
{
  return 0;
}
$ clang++70 test.cc
In file included from test.cc:1:
In file included from /usr/include/boost/heap/fibonacci_heap.hpp:19:
/usr/include/boost/heap/detail/heap_comparison.hpp:139:34: error: no type named 'if_c' in namespace
      'boost::mpl'
    typedef typename boost::mpl::if_c<use_ordered_iterators,
            ~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/boost/heap/detail/heap_comparison.hpp:139:38: error: expected unqualified-id
    typedef typename boost::mpl::if_c<use_ordered_iterators,
                                     ^
/usr/include/boost/heap/detail/heap_comparison.hpp:144:5: error: unknown type name 'equivalence_check'
    equivalence_check eq_check;
    ^
/usr/include/boost/heap/detail/heap_comparison.hpp:228:34: error: no type named 'if_c' in namespace
      'boost::mpl'
    typedef typename boost::mpl::if_c<use_ordered_iterators,
            ~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/boost/heap/detail/heap_comparison.hpp:228:38: error: expected unqualified-id
    typedef typename boost::mpl::if_c<use_ordered_iterators,
                                     ^
/usr/include/boost/heap/detail/heap_comparison.hpp:233:5: error: unknown type name 'compare_check'
    compare_check check_object;
    ^
6 errors generated.
pdimov commented 6 years ago

cc @glenfe :-)

pdimov commented 6 years ago

@jbeich When you already have a failing test, it's better to use a pull request that adds it, instead of an issue. Not that an issue doesn't work and we don't appreciate it all the same, of course. :-)

Lastique commented 6 years ago

I'll create a PR for Boost.Heap adding the missing includes.

Lastique commented 6 years ago

See https://github.com/boostorg/heap/pull/13.

glenfe commented 6 years ago

Also #14.

pdimov commented 6 years ago

I enabled Travis; closing and reopening the PRs will trigger it.

timblechmann commented 6 years ago

thanks a lot for the PRs! i'd merge #14 to avoid the mpl dependency here