Boost logo

Boost Users :

From: Krishna Roskin (krish_at_[hidden])
Date: 2007-07-02 23:51:54


Hey everyone,

I'm trying to use Boost.Parameter to make my 9 parameter BGL function more
manageable.

My code is very close to the example given in the Parameter docs for
depth_first_search:

BOOST_PARAMETER_NAME(simplified)
BOOST_PARAMETER_NAME(original)
BOOST_PARAMETER_NAME(initial_vertex)
BOOST_PARAMETER_NAME(final_vertex)

BOOST_PARAMETER_FUNCTION(
  (void),
  simp,
  tag,
  (required
    (in_out(simplified), *)
    (original, *)
  )
  (optional
    (initial_vertex,
      (typename graph_traits<original_type>::vertex_descriptor),
      original.initial_vertex)
    (final_vertex,
      (typename graph_traits<original_type>::vertex_descriptor),
      original.final_vertex)
    )
) {
  simplify(simplified, original,
    target_io_edge_map<simplified_type, original_type>(),
    accumulate_edge_weight(), initial_vertex, final_vertex);
}

When compiling this under GCC 4.0.1 I get an "'original_type' has not been
declared" error in the function signature. The original_type in the function
body is fine.

If I change the type of initial_vertex and final_vertex to *, then everything
works fine. Any idea why this code (which is almost the same as the example
given for depth_first_search) doesn't work?

Thanks for any help anyone can give and I hope everyone's having a good summer.

-krish

I'm using 1.34 and here's what gcc -v says:

Using built-in specs.
Target: i686-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5250.obj~12/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --build=powerpc-apple-darwin8
--with-arch=pentium-m --with-tune=prescott --program-prefix=
--host=i686-apple-darwin8 --target=i686-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5250)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net