[parameter] _type not defined in function signature

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)

on Mon Jul 02 2007, Krishna Roskin <krish-AT-soe.ucsc.edu> wrote:
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.
The answer is in http://svn.boost.org/trac/boost/ticket/1044 I hope we'll have the fix in 1.34.1 in the meantime I suggest you patch your local copy of Boost. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com

On Jul 3, 2007, at 7:25 AM, David Abrahams wrote:
on Mon Jul 02 2007, Krishna Roskin <krish-AT-soe.ucsc.edu> wrote:
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.
The answer is in http://svn.boost.org/trac/boost/ticket/1044
I hope we'll have the fix in 1.34.1
in the meantime I suggest you patch your local copy of Boost.
I downloaded that patch and applied it but it doesn't seem to fix the issue. I even tried doing a _type in the return type of a BOOST_PARAMETER_FUNCTION defined function (which is more directly related to the ticket comment) but that didn't seem to work either. Am I missing some other patches? Am I missing something obvious? -krish -- Krishna Roskin Center for Biomolecular Science and Engineering, UC Santa Cruz mailto:krish@soe.ucsc.edu http://www.soe.ucsc.edu/~krish/ "It is our blasphemy which has made us great, and will sustain us, and which the gods secretly admire in us." --Roger Zelazny, A Rose for Eccclesiastes
participants (2)
-
David Abrahams
-
Krishna Roskin