Boost logo

Boost :

Subject: [boost] [parameter] Testing for existence of a parameter, building ArgumentPacks, more lazy return types
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2009-05-23 23:50:13

I have a few questions about the parameter library. Please note that I am
using argument packs directly, since I am creating them from another data

1. Is there a way to build Boost.Parameter ArgumentPacks from a program?
I am currently using many internal data structures of Boost.Parameter
(empty_arg_list and such). Is there another interface to use?

2. Is there a way to tell at compile-time whether a particular parameter
exists in an ArgumentPack? I currently have a metafunction that uses a
special default type and tests for that; is there a more "official" way?

3. I have a case where the default type for a named parameter cannot be
instantiated in some cases where that parameter is given explicitly. The
operator||() lazy defaults don't seem to work for that because they get
the result_type member from my default right away, even if it won't be
used. I currently have a hack to work around this using my
parameter_exists test and some metaprogramming.

The reason I am working on this low of a level is that I am playing with
converting Boost.Graph named parameter structures into ArgumentPacks to
have access to Boost.Parameter's nicer capabilities and syntax. I thus
need to build all of the argument data structures and such within another
function and then access them later. Thank you for your help.

-- Jeremiah Willcock

Boost list run by bdawes at, gregod at, cpdaniel at, john at