From 6932e9b1dc45df3bcab5a91e3ed092f442b5f75a Mon Sep 17 00:00:00 2001 From: Lorenzo Caminiti Date: Mon, 20 Feb 2012 20:11:42 +0000 Subject: [PATCH] Fixed test indentation and updated docs. [SVN r77079] --- ..._OVERLOADED_FUNCTION_CONFIG_ARITY_MAX.html | 2 +- ...ERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX.html | 2 +- .../html/boost/make_overloaded_function.html | 2 +- .../doc/html/boost/overloaded_function.html | 22 ++++++++-------- .../Tutorial.html | 18 ++++++------- overloaded_function/doc/html/index.html | 14 +++++----- overloaded_function/test/identity.cpp | 26 +++++++++---------- 7 files changed, 43 insertions(+), 43 deletions(-) diff --git a/overloaded_function/doc/html/BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX.html b/overloaded_function/doc/html/BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX.html index 7fb743f..e51036e 100644 --- a/overloaded_function/doc/html/BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX.html +++ b/overloaded_function/doc/html/BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX.html @@ -33,7 +33,7 @@ BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX
-

Description

+

Description

If this macro is left undefined by the user, it has a default value of 5 (increasing this number might increase compilation time). When specified by the user, this macro must be a non-negative integer number.

See: Getting Started, boost::overloaded_function.

diff --git a/overloaded_function/doc/html/BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX.html b/overloaded_function/doc/html/BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX.html index c603c6b..a8a75b6 100644 --- a/overloaded_function/doc/html/BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX.html +++ b/overloaded_function/doc/html/BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX.html @@ -33,7 +33,7 @@ BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX
-

Description

+

Description

If this macro is left undefined by the user, it has a default value of 5 (increasing this number might increase compilation time). When defined by the user, this macro must be an integer number greater or equal than 2 (because at least two distinct functions need to be specified in order to define an overload).

See: Getting Started, boost::overloaded_function.

diff --git a/overloaded_function/doc/html/boost/make_overloaded_function.html b/overloaded_function/doc/html/boost/make_overloaded_function.html index 6ce8980..65d1fce 100644 --- a/overloaded_function/doc/html/boost/make_overloaded_function.html +++ b/overloaded_function/doc/html/boost/make_overloaded_function.html @@ -36,7 +36,7 @@ overloaded_function< __function_type__< F1 >, __function_type__< F2 >,...> make_overloaded_function(F1 f1, F2 f2, ...);
-

Description

+

Description

This function template creates and returns an overloaded_function function object that overloads all the specified functions f1, f2, etc.

The function types are internally determined from the template parameter types so they do not need to be explicitly specified. Therefore, this function template usually has a more concise syntax when compared with overloaded_function. This is especially useful when the explicit type of the returned overloaded_function does not need to be known (e.g., when used with Boost.Typeof's BOOST_AUTO (or C++11 auto) or when the overloaded function object is handled using a function template parameter, see the Tutorial section).

The maximum number of functions to overload is given by the BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX configuration macro.

diff --git a/overloaded_function/doc/html/boost/overloaded_function.html b/overloaded_function/doc/html/boost/overloaded_function.html index a0e95b4..4f70698 100644 --- a/overloaded_function/doc/html/boost/overloaded_function.html +++ b/overloaded_function/doc/html/boost/overloaded_function.html @@ -35,19 +35,19 @@ class overloaded_function { public: // construct/copy/destruct - overloaded_function(const boost::function< F1 > &, + overloaded_function(const boost::function< F1 > &, const boost::function< F2 > &, ...); - // public member functions + // public member functions boost::function_traits< F1 >::result_type - operator()(typename boost::function_traits< F1 >::arg1_type, + operator()(typename boost::function_traits< F1 >::arg1_type, typename boost::function_traits< F1 >::arg2_type, ...) const; boost::function_traits< F2 >::result_type - operator()(typename boost::function_traits< F2 >::arg1_type, + operator()(typename boost::function_traits< F2 >::arg1_type, typename boost::function_traits< F2 >::arg2_type, ...) const; };
-

Description

+

Description

This function object aggregates together calls to functions of all the specified function types F1, F2, etc. The specified function types must have distinct parameters from one another and they must be in the following format (which is the Boost.Function preferred syntax):

    result_type (argument1_type, argumgnet2_type, ...)
 
@@ -55,27 +55,27 @@

The maximum number of functions to overload is given by the BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX configuration macro. The maximum number of function parameters for each of the specified function types is given by the BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX configuration macro.

See: Tutorial section, make_overloaded_function, BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX, BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX, Boost.Function.

-

+

overloaded_function public construct/copy/destruct

  1. -
    overloaded_function(const boost::function< F1 > &, 
    +
    overloaded_function(const boost::function< F1 > &, 
                         const boost::function< F2 > &, ...);
    Construct the overloaded function object.

    Any function pointer, function reference, and monomorphic function object that can be converted to a boost::function function object can be specified as parameter.

-

-overloaded_function public member functions

+

+overloaded_function public member functions

  1. boost::function_traits< F1 >::result_type 
    -operator()(typename boost::function_traits< F1 >::arg1_type, 
    +operator()(typename boost::function_traits< F1 >::arg1_type, 
                typename boost::function_traits< F1 >::arg2_type, ...) const;
    Call operator matching the signature of the function type specified as 1st template parameter.

    This will in turn invoke the call operator of the 1st function passed to the constructor.

  2. boost::function_traits< F2 >::result_type 
    -operator()(typename boost::function_traits< F2 >::arg1_type, 
    +operator()(typename boost::function_traits< F2 >::arg1_type, 
                typename boost::function_traits< F2 >::arg2_type, ...) const;
    Call operator matching the signature of the function type specified as 2nd template parameter.

    This will in turn invoke the call operator of the 2nd function passed to the constructor.

    Note: Similar call operators are present for all specified function types F1, F2, etc (even if not exhaustively listed by this documentation).

  3. diff --git a/overloaded_function/doc/html/boost_functional_overloadedfunction/Tutorial.html b/overloaded_function/doc/html/boost_functional_overloadedfunction/Tutorial.html index ffd899d..cbb370d 100644 --- a/overloaded_function/doc/html/boost_functional_overloadedfunction/Tutorial.html +++ b/overloaded_function/doc/html/boost_functional_overloadedfunction/Tutorial.html @@ -69,9 +69,9 @@ > identity(identity_s, identity_i, identity_d); // All calls via single `identity` function. -BOOST_CHECK( identity("abc") == "abc" ); -BOOST_CHECK( identity(123) == 123 ); -BOOST_CHECK( identity(1.23) == 1.23 ); +BOOST_CHECK(identity("abc") == "abc"); +BOOST_CHECK(identity(123) == 123); +BOOST_CHECK(identity(1.23) == 1.23);

    @@ -121,9 +121,9 @@
    BOOST_AUTO(identity, boost::make_overloaded_function(
             identity_s, identity_i, identity_d));
     
    -BOOST_CHECK( identity("abc") == "abc" );
    -BOOST_CHECK( identity(123) == 123 );
    -BOOST_CHECK( identity(1.23) == 1.23 );
    +BOOST_CHECK(identity("abc") == "abc");
    +BOOST_CHECK(identity(123) == 123);
    +BOOST_CHECK(identity(1.23) == 1.23);
     

    @@ -149,9 +149,9 @@

    template<typename F>
     void check(F identity) {
    -    BOOST_CHECK( identity("abc") == "abc" );
    -    BOOST_CHECK( identity(123) == 123 );
    -    BOOST_CHECK( identity(1.23) == 1.23 );
    +    BOOST_CHECK(identity("abc") == "abc");
    +    BOOST_CHECK(identity(123) == 123);
    +    BOOST_CHECK(identity(1.23) == 1.23);
     }
     

    diff --git a/overloaded_function/doc/html/index.html b/overloaded_function/doc/html/index.html index a2e0f0d..f900f8e 100644 --- a/overloaded_function/doc/html/index.html +++ b/overloaded_function/doc/html/index.html @@ -87,9 +87,9 @@

    -
    BOOST_CHECK( identity_s("abc") == "abc" );
    -BOOST_CHECK( identity_i(123) == 123 );
    -BOOST_CHECK( identity_d(1.23) == 1.23 );
    +
    BOOST_CHECK(identity_s("abc") == "abc");
    +BOOST_CHECK(identity_i(123) == 123);
    +BOOST_CHECK(identity_d(1.23) == 1.23);
     

    @@ -108,9 +108,9 @@ > identity(identity_s, identity_i, identity_d); // All calls via single `identity` function. -BOOST_CHECK( identity("abc") == "abc" ); -BOOST_CHECK( identity(123) == 123 ); -BOOST_CHECK( identity(1.23) == 1.23 ); +BOOST_CHECK(identity("abc") == "abc"); +BOOST_CHECK(identity(123) == 123); +BOOST_CHECK(identity(1.23) == 1.23);

    @@ -133,7 +133,7 @@
- +

Last revised: February 17, 2012 at 20:42:39 GMT

Last revised: February 20, 2012 at 20:10:59 GMT


diff --git a/overloaded_function/test/identity.cpp b/overloaded_function/test/identity.cpp index 7df5b7b..9028af7 100644 --- a/overloaded_function/test/identity.cpp +++ b/overloaded_function/test/identity.cpp @@ -14,9 +14,9 @@ //[identity_make_checks template void check(F identity) { - BOOST_CHECK( identity("abc") == "abc" ); - BOOST_CHECK( identity(123) == 123 ); - BOOST_CHECK( identity(1.23) == 1.23 ); + BOOST_CHECK(identity("abc") == "abc"); + BOOST_CHECK(identity(123) == 123); + BOOST_CHECK(identity(1.23) == 1.23); } //] @@ -30,11 +30,11 @@ double identity_d_impl(double x) { return x; } boost::function identity_d = identity_d_impl; // Functor. //] -BOOST_AUTO_TEST_CASE( test_identity ) { +BOOST_AUTO_TEST_CASE(test_identity) { //[identity_calls - BOOST_CHECK( identity_s("abc") == "abc" ); - BOOST_CHECK( identity_i(123) == 123 ); - BOOST_CHECK( identity_d(1.23) == 1.23 ); + BOOST_CHECK(identity_s("abc") == "abc"); + BOOST_CHECK(identity_i(123) == 123); + BOOST_CHECK(identity_d(1.23) == 1.23); //] { @@ -46,9 +46,9 @@ BOOST_AUTO_TEST_CASE( test_identity ) { > identity(identity_s, identity_i, identity_d); // All calls via single `identity` function. - BOOST_CHECK( identity("abc") == "abc" ); - BOOST_CHECK( identity(123) == 123 ); - BOOST_CHECK( identity(1.23) == 1.23 ); + BOOST_CHECK(identity("abc") == "abc"); + BOOST_CHECK(identity(123) == 123); + BOOST_CHECK(identity(1.23) == 1.23); //] } @@ -57,9 +57,9 @@ BOOST_AUTO_TEST_CASE( test_identity ) { BOOST_AUTO(identity, boost::make_overloaded_function( identity_s, identity_i, identity_d)); - BOOST_CHECK( identity("abc") == "abc" ); - BOOST_CHECK( identity(123) == 123 ); - BOOST_CHECK( identity(1.23) == 1.23 ); + BOOST_CHECK(identity("abc") == "abc"); + BOOST_CHECK(identity(123) == 123); + BOOST_CHECK(identity(1.23) == 1.23); //] }