Opened 7 years ago

Last modified 6 years ago

#11955 new Bugs

boost/graph/adjacency_matrix.hpp triggers deprecated code

Reported by: fiesh@… Owned by: Jeremiah Willcock
Milestone: To Be Determined Component: graph
Version: Boost 1.60.0 Severity: Problem
Keywords: Cc:

Description

I understand that this probably doesn't seem important, since many other files are similar in boost::graph.

It requires functional/hash.hpp, and, more importantly and only as of recently, type_traits/ice.hpp. However, the latter now is deprecated.

Change History (6)

comment:1 by anonymous, 7 years ago

My original subject line read "boost/graph/adjacency_matrix.hpp cannot be included by itself" -- I changed it but didn't change the description, so please don't be confused.

comment:2 by Murray Cumming <murrayc@…>, 6 years ago

What's the actual compiler warning that you see?

comment:3 by Murray Cumming <murrayc@…>, 6 years ago

comment:4 by fiesh@…, 6 years ago

It isn't, the following code does not compile:

#include <boost/graph/adjacency_matrix.hpp>
int main() {}

it results in

In file included from /usr/include/boost/graph/adjacency_matrix.hpp:26:0,
                 from a.cpp:1:
/usr/include/boost/graph/detail/edge.hpp:111:10: error: ‘hash’ is not a class template
   struct hash<boost::detail::edge_desc_impl<D, V> >

comment:5 by Murray Cumming <murrayc@…>, 6 years ago

Thanks.

The use of deprecated ice.hpp is one problem. That does seem to be a duplicate of https://svn.boost.org/trac/boost/ticket/11880 and is fixed in https://github.com/boostorg/graph/commit/1d5f43d9f6e8a5295bad7593db942cc755eb664c

The use of functional/hash.hpp (not deprecated)? without an include seems to have been fixed here: https://github.com/boostorg/graph/commit/6e1ed79cbc6a07ed7732dace466f1ea344d97dec

Both fixes are likely to appear in boost 1.62 because they are now in the master branch.

comment:6 by fiesh@…, 6 years ago

Ah, then it should be fine, thanks!

Note: See TracTickets for help on using tickets.