diff --git a/doc/named_params.html b/doc/named_params.html index 4b3723f..f1a0720 100755 --- a/doc/named_params.html +++ b/doc/named_params.html @@ -1,8 +1,8 @@ - +
- +In C++ function arguments are given meaning by their position in the parameter list. This protocol is fine when there are few parameters with default values, but as the number of parameters @@ -114,7 +114,7 @@ The tutorial has to come before all the nasty details below. I'm going to comment on that and leave the next stuff alone -->
This example shows how to wrap a function:
@@ -123,7 +123,7 @@ void foo(char const* name, float value);to give both parameters names and default values.
First we define the named parameter keywords. This is done by creating "tag" types for each keyword, and declaring keyword<tag> objects:
@@ -154,7 +154,7 @@ struct foo_keywords
template<class Params> void foo_impl(const Params&); @@ -178,7 +178,7 @@ void foo(const A0& a0, const A1& a1)
template<class Params> void foo_impl(const Params& params) @@ -232,7 +232,7 @@ unnamed = 3
Because the keywords' operator= returns a temporary, and temporaries cannot be bound to non-const reference parameters, our forwarding functions need to take their arguments by const @@ -253,7 +253,7 @@ foo(boost::ref(x)); // held type is float& boost::ref will be unwrapped automatically by the library.
The parameters of our templated forwarding functions are completely general; in fact, they're a perfect match for any argument type whatsoever. The problems with exposing such general function @@ -330,7 +330,7 @@ by callers; they merely trigger SFINAE by becoming illegal types when the name argument is not convertible to const char*.
If computing an argument's default value is expensive, it's best avoided when the argument is supplied by the user. In that case, the default value can be lazily evaluated using the following @@ -359,7 +359,7 @@ void bar_impl(Params const& params)
To reduce the work needed to write functions with named parameters, we supply a macro that generates the boilerplate code.
Synopsis:
@@ -382,7 +382,7 @@ BOOST_NAMED_PARAMS_FUN(void, foo, 0, 2, foo_keywords)Boost.NamedParams has been confirmed to work on the following compilers:
@@ -437,7 +437,7 @@ of lack of SFINAE support.