[Heaps] Compiler error: ‘optional’ was not declared in this scope

Dear All, I'm trying to do some simple tests with the proposed Heaps library, but I get a mountain of compiler errors that start like this: ./boost_heap-HEAD-449f378/boost/heap/priority_queue.hpp:32: error: ‘optional’ was not declared in this scope ./boost_heap-HEAD-449f378/boost/heap/priority_queue.hpp:32: error: template argument 1 is invalid ./boost_heap-HEAD-449f378/boost/heap/priority_queue.hpp:32: error: expected unqualified-id before ‘,’ token I thought this was probably due to me having a too-old boost installation, but I believe I'm now compiling with 1.46.1 and I get the same error (though I need to verify that my paths are all set correctly). Any ideas anyone? (I've arrived late to this review having been away, but I'd like to do some quick benchmarks if I have time.) Thanks, Phil.

Phil Endecott wrote:
I'm trying to do some simple tests with the proposed Heaps library, but I get a mountain of compiler errors that start like this:
...
I thought this was probably due to me having a too-old boost installation, but I believe I'm now compiling with 1.46.1 and I get the same error (though I need to verify that my paths are all set correctly). Any ideas anyone?
I would guess something went wrong during the preprocessing phase (like a missing include file), because gcc ...

Phil Endecott <spam_from_boost_dev <at> chezphil.org> writes:
I'm trying to do some simple tests with the proposed Heaps library, but I get a mountain of compiler errors that start like this:
Well I've got it to work by changing priority_queue.hpp from this: typedef parameter::parameters<optional<tag::allocator>, optional<tag::compare>, optional<tag::stable> > priority_queue_signature; to this: typedef parameter::parameters<boost::parameter::optional<tag::allocator>, boost::parameter::optional<tag::compare>, boost::parameter::optional<tag::stable> > priority_queue_signature; I really don't know what's going on there. Some provisional benchmark numbers coming soon... Phil.

I'm trying to do some simple tests with the proposed Heaps library, but
I get a mountain of compiler errors that start like this: Well I've got it to work by changing priority_queue.hpp from this:
typedef parameter::parameters<optional<tag::allocator>, optional<tag::compare>, optional<tag::stable>
> priority_queue_signature;
to this:
typedef parameter::parameters<boost::parameter::optional<tag::allocator>, boost::parameter::optional<tag::compare>, boost::parameter::optional<tag::stable>
> priority_queue_signature;
I really don't know what's going on there.
haven't seen that before ... which compiler? might be a good idea to change this in general ... tim
participants (3)
-
Phil Endecott
-
Thomas Klimpel
-
Tim Blechmann