Opened 8 years ago

Last modified 7 years ago

#11015 new Bugs

Bug with boost/graph/detail/edge.hpp

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

Description

Hi,

I found a bug and it has not been solved yet (i searched on the latest source on the git repo), ok here it is:

The bug is that the use of the header "boost/graph/detail/edge.hpp" alone in a program cause an error at the compilation:

This error say that the "hash struct" is not a template class. After some searching i noticed that this "hash struct" is a template specialization, and the problem is that the "hash struct" generic template is not included in this file, i fixed it by adding the "boost/functional/hash/hash.hpp" header.

I don't know if this fix could be enough, but it works for my use.

Attachments (2)

diff.txt (264 bytes ) - added by mzartek@… 8 years ago.
Output of the diff -u between the old and new "boost/graph/detail/edge.hpp" file
bgl_csr_edge_hash_fix.h (825 bytes ) - added by djh 7 years ago.
Hashable Edge POC for Compressed Sparse Row Graph

Download all attachments as: .zip

Change History (4)

by mzartek@…, 8 years ago

Attachment: diff.txt added

Output of the diff -u between the old and new "boost/graph/detail/edge.hpp" file

comment:1 by viboes, 8 years ago

Component: Nonegraph
Owner: set to Jeremiah Willcock

by djh, 7 years ago

Attachment: bgl_csr_edge_hash_fix.h added

Hashable Edge POC for Compressed Sparse Row Graph

comment:2 by djh, 7 years ago

I had similar issues with missing hash specializations, when storing Compressed Sparse Row (CSR) Graph Edges in unordered sets.

I attached a trivial std hash specialization that works for me, but may need to be more generic (e.g. depending in the EdgeIndex and Vertex type).

Note: See TracTickets for help on using tickets.