Boost logo

Boost Users :

Subject: Re: [Boost-users] [parameter] Composing ArgumentPacks
From: er (erwann.rogard_at_[hidden])
Date: 2009-04-15 12:57:02


> BOOST_PARAMETER_KEYWORD(tag, x)
> BOOST_PARAMETER_KEYWORD(tag, y)
>
> template<class ArgumentPack>
> void f(ArgumentPack const & args){
> double x_val = args[x];
> double y_val = args[y];
> }

     typedef boost::parameter::parameters<
         parameter::required<tag::x>
> par_x_t;
     typedef boost::parameter::parameters<
         parameter::required<tag::y>
> par_y_t;

> double x_val = 9.0;
> double y_val = 0.1;
> spec_x_t spec_x;
> spec_y_t spec_y;
> f(
> ( spec_x(x_val),spec_y(y_val)) // (5)
> ); //no match operator[<unnamed>::x]
>

Hi All. Am I using Parameter incorrectly in this example?


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