Repository navigation
[GNATS 23277] Boost header issue (heap_node.hpp). Spurious diagnostic for invalid destructor name. #119
jhsedg
started this conversation in
Issue Triage - General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Customer bug ID
(boost) binomial_heap_test and others, (gnats) 23277.C full expanded test, 23277a.C (reduced)
Description
This is the reduced test. The full expanded test is in gnats/23277.C
struct parent_pointing_heap_node;
struct allocator_pointer {
typedef parent_pointing_heap_node *type;
};
struct allocator_rebind {};
class list_impl {
public:
template void clear_and_dispose(Disposer disposer) {
disposer(0);
}
};
template struct node_disposer {
typedef allocator_pointer::type node_pointer;
node_disposer(allocator_rebind);
void operator()(int) {
node_pointer n;
node_pointer()->clear_subtree(alloc_);
n->~Node();
}
allocator_rebind alloc_;
};
struct heap_node {
template void clear_subtree(Alloc alloc) {
children.clear_and_dispose(node_disposer<heap_node>(alloc));
}
list_impl children;
};
struct parent_pointing_heap_node : heap_node {};
struct type : allocator_rebind {
type(int);
};
class binomial_heap : type {
int binomial_heap_cmp;
binomial_heap() : type(binomial_heap_cmp) {
trees.clear_and_dispose(node_disposer<parent_pointing_heap_node>(*this));
}
list_impl trees;
};
[ellen@lin1 failures]$ eccp --gnu_version 80100 -w -tused binomial_heap_test.E.reduced.C
"binomial_heap_test.E.reduced.C", line 18: error: invalid destructor name for
type "parent_pointing_heap_node"
n->~Node();
^
detected during:
instantiation of "void node_disposer::operator()(int) [with
Node=heap_node]" at line 9
instantiation of "void list_impl::clear_and_dispose(Disposer) [with
Disposer=node_disposer<heap_node>]" at line 24
instantiation of "void heap_node::clear_subtree(Alloc) [with
Alloc=allocator_rebind]" at line 17
instantiation of "void node_disposer::operator()(int) [with
Node=parent_pointing_heap_node]" at line 9
instantiation of "void list_impl::clear_and_dispose(Disposer) [with
Disposer=node_disposer<parent_pointing_heap_node>]" at
line 35
1 error detected in the compilation of "binomial_heap_test.E.reduced.C".
All reactions