Boost logo

Boost Users :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2006-06-01 11:02:17


Cromwell Enage wrote:
> --- Daniel Wallin wrote:
>> Cromwell Enage wrote:
>>> My own code is using outdated syntax. Looks like
>>> I have to add those default values into my
>>> BOOST_PARAMETER_FUNCTION calls.
>> Right. The older syntax is still supported, but with
>> new names:
>>
>> BOOST_PARAMETER_BASIC_*
>
> That's good to know, because I haven't figured out how
> to reimplement most of my graph algorithms using the
> new syntax, due to interdependencies between their
> default values.

We are in the process of updating the documentation for the new syntax.
The rule regarding interdependencies is that arguments may depend on
previous arguments. So for instance:

  BOOST_PARAMETER_FUNCTION(
    (void), f, tag,

    (required
      (x, *)
      (y, *))
    (optional
      (z, *, x + z)
      (u, *, z))
  )

is OK. And:

  f(x = 1, y = 2)

is equivalent to

  f(x = 1, y = 2, z = 1 + 2, u = 1 + 2)

-- 
Daniel Wallin

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