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 @@ - + - + The Boost.NamedParams Library Boost @@ -35,22 +35,22 @@ file LICENSE_1_0.txt or copy at

Outline

-

1   Introduction

+

1   Introduction

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 -->

-

2   Tutorial

+

2   Tutorial

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.

-

2.1   Defining the keywords

+

2.1   Defining the keywords

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
 
-

2.2   Defining the forwarding functions

+

2.2   Defining the forwarding functions

 template<class Params>
 void foo_impl(const Params&);
@@ -178,7 +178,7 @@ void foo(const A0& a0, const A1& a1)
 
-

2.3   Defining the implementation function

+

2.3   Defining the implementation function

 template<class Params>
 void foo_impl(const Params& params)
@@ -232,7 +232,7 @@ unnamed = 3
 
-

3   Limitations of the Approach

+

3   Limitations of the Approach

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.

-

4   Controlling Overload Resolution

+

4   Controlling Overload Resolution

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*.

-

5   Lazy Evaluation of Defaults

+

5   Lazy Evaluation of Defaults

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)

-

6   Automatic Overload Generation

+

6   Automatic Overload Generation

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)
-

7   Portability

+

7   Portability

Boost.NamedParams has been confirmed to work on the following compilers: