#include template struct Foo { typename boost::heap::d_ary_heap, boost::heap::mutable_>::ordered_iterator it; Foo() : it() {} }; int main() { auto heap = boost::heap::d_ary_heap, boost::heap::mutable_>(); heap.push(1); auto foo = Foo(); foo.it = heap.ordered_begin(); }