diff --git a/build/Jamfile b/build/Jamfile index 19f1c60..bace553 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -2,7 +2,7 @@ # (C) Copyright Tobias Schwinger # # Use modification and distribution are subject to the boost Software License, -# Version 1.0. (See http:/\/www.boost.org/LICENSE_1_0.txt). +# Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). # Generates preprocessed files with wave. @@ -13,16 +13,24 @@ rule wave actions wave { - chdir $(BOOST_ROOT)/libs/function_types/build - $(BOOST_ROOT)/dist/bin/wave -S$(BOOST_ROOT) $(>) -o $(<) + ../../../dist/bin/wave -S../../.. $(>) -o $(<) } -make $(BOOST_ROOT)/libs/function_types/build/timestamps/arity_loops - : preprocess_arity_loops.cpp : wave ; +make ../../../libs/function_types/build/timestamps/arity_loops + : preprocess_arity_loops.cpp : wave + ; -make $(BOOST_ROOT)/libs/function_types/build/timestamps/encoding - : preprocess_encoding.cpp : wave ; +explicit ../../../libs/function_types/build/timestamps/arity_loops ; -make $(BOOST_ROOT)/libs/function_types/build/timestamps/cc_names - : preprocess_cc_names.cpp : wave ; +make ../../../libs/function_types/build/timestamps/encoding + : preprocess_encoding.cpp : wave + ; + +explicit ../../../libs/function_types/build/timestamps/encoding ; + +make ../../../libs/function_types/build/timestamps/cc_names + : preprocess_cc_names.cpp : wave + ; + +explicit ../../../libs/function_types/build/timestamps/cc_names ; diff --git a/build/preprocess_arity_loops.cpp b/build/preprocess_arity_loops.cpp index a045e9f..d39b65c 100644 --- a/build/preprocess_arity_loops.cpp +++ b/build/preprocess_arity_loops.cpp @@ -2,7 +2,7 @@ // (C) Copyright Tobias Schwinger // // Use modification and distribution are subject to the boost Software License, -// Version 1.0. (See http:/\/www.boost.org/LICENSE_1_0.txt). +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). //------------------------------------------------------------------------------ diff --git a/build/preprocess_cc_names.cpp b/build/preprocess_cc_names.cpp index 39d77c5..803667c 100644 --- a/build/preprocess_cc_names.cpp +++ b/build/preprocess_cc_names.cpp @@ -2,7 +2,7 @@ // (C) Copyright Tobias Schwinger // // Use modification and distribution are subject to the boost Software License, -// Version 1.0. (See http:/\/www.boost.org/LICENSE_1_0.txt). +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). //------------------------------------------------------------------------------ diff --git a/build/preprocess_encoding.cpp b/build/preprocess_encoding.cpp index e2e4a5e..886bec3 100644 --- a/build/preprocess_encoding.cpp +++ b/build/preprocess_encoding.cpp @@ -2,7 +2,7 @@ // (C) Copyright Tobias Schwinger // // Use modification and distribution are subject to the boost Software License, -// Version 1.0. (See http:/\/www.boost.org/LICENSE_1_0.txt). +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). //------------------------------------------------------------------------------ diff --git a/doc/Jamfile b/doc/Jamfile index b286aea..fc28d86 100644 --- a/doc/Jamfile +++ b/doc/Jamfile @@ -2,7 +2,7 @@ # (C) Copyright Tobias Schwinger # # Use modification and distribution are subject to the boost Software License, -# Version 1.0. (See http:/\/www.boost.org/LICENSE_1_0.txt). +# Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). using quickbook ; @@ -13,8 +13,7 @@ boostbook standalone : boost.root=../../../.. boost.libraries=../../../libraries.htm - nav.layout=none - navig.graphics=0 + html.stylesheet=../../../../doc/html/boostbook.css chunk.first.sections=1 chunk.section.depth=2 generate.section.toc.level=2 diff --git a/doc/function_types.qbk b/doc/function_types.qbk index 2a6d83f..598a7b5 100644 --- a/doc/function_types.qbk +++ b/doc/function_types.qbk @@ -897,7 +897,7 @@ definition of [^BOOST_FT_CC_NAMES]: [section:BOOST_FT_CC BOOST_FT\_CC\_*] -Enables a specific calling convention. * dentoes the macro suffix, as +Enables a specific calling convention. * denotes the macro suffix, as defined by [link boost_functiontypes.reference.macros.BOOST_FT_CC_NAMES [^BOOST_FT_CC_NAMES]] or @@ -1086,6 +1086,7 @@ Thanks go to the following people for supporting the development of this library in one or the other way: * David Abrahams +* Tom Brinkman * Aleksey Gurtovoy * Jody Hagins * Hartmut Kaiser @@ -1093,9 +1094,12 @@ library in one or the other way: * John Maddock * Paul Mensonides * Alexander Nasonov +* Richard Smith * Rob Stewart * Jonathan Turkanis * Pavel Vozenilek +* Steven Watanabe +* K. Noel Belcourt [endsect] diff --git a/doc/html/boost_functiontypes/about_tag_types.html b/doc/html/boost_functiontypes/about_tag_types.html index 80413e7..7d07a85 100644 --- a/doc/html/boost_functiontypes/about_tag_types.html +++ b/doc/html/boost_functiontypes/about_tag_types.html @@ -1,23 +1,31 @@ - About Tag Types - - +About Tag Types + + - - + + -
Boost C++ Libraries
+ + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore

Boost.FunctionTypes uses tag types to encode properties that are not types per se, such as calling convention or whether a function is variadic or cv- @@ -77,11 +85,15 @@ - +
Copyright © 2004 -2007 Tobias Schwinger


diff --git a/doc/html/boost_functiontypes/acknowledgements.html b/doc/html/boost_functiontypes/acknowledgements.html index 441ab7c..b0498b7 100644 --- a/doc/html/boost_functiontypes/acknowledgements.html +++ b/doc/html/boost_functiontypes/acknowledgements.html @@ -1,22 +1,30 @@ - Acknowledgements - - +Acknowledgements + + - + -
Boost C++ Libraries
+ + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore

Thanks go to the following people for supporting the development of this library in one or the other way: @@ -25,6 +33,9 @@

  • David Abrahams
  • +
  • + Tom Brinkman +
  • Aleksey Gurtovoy
  • @@ -46,6 +57,9 @@
  • Alexander Nasonov
  • +
  • + Richard Smith +
  • Rob Stewart
  • @@ -55,15 +69,25 @@
  • Pavel Vozenilek
  • +
  • + Steven Watanabe +
  • +
  • + K. Noel Belcourt +
  • - +
    Copyright © 2004 -2007 Tobias Schwinger

    diff --git a/doc/html/boost_functiontypes/introduction.html b/doc/html/boost_functiontypes/introduction.html index 5047583..cdaf6b1 100644 --- a/doc/html/boost_functiontypes/introduction.html +++ b/doc/html/boost_functiontypes/introduction.html @@ -1,23 +1,31 @@ - Introduction - - +Introduction + + - + -
    Boost C++ Libraries
    + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore

    Boost.FunctionTypes provides functionality to classify, decompose and synthesize function, function pointer, function reference and pointer to member types. @@ -49,39 +57,38 @@ constant called value.

    -is_function_pointer< bool(*)(int) >::value // == true 
    +is_function_pointer< bool(*)(int) >::value // == true 
     
    -function_arity< bool(*)(int) >::value // == 1
    +function_arity< bool(*)(int) >::value // == 1
     

    Templates that encapsulate properties that are single types contain a type member called type.

    -function_type< mpl::vector<bool,int> >::type // is bool(int)
    +function_type< mpl::vector<bool,int> >::type // is bool(int)
     
    -result_type< bool(&)(int) >::type // is bool
    +result_type< bool(&)(int) >::type // is bool
     

    Templates that encapsulate properties that are type lists model an MPL-compatible type sequence.

    -parameter_types< bool(int) > // models an MPL sequence
    +parameter_types< bool(int) > // models an MPL sequence
     
    - +
    Copyright © 2004 -2007 Tobias Schwinger

    diff --git a/doc/html/boost_functiontypes/rationale.html b/doc/html/boost_functiontypes/rationale.html index fc44924..5ba69d0 100644 --- a/doc/html/boost_functiontypes/rationale.html +++ b/doc/html/boost_functiontypes/rationale.html @@ -1,28 +1,36 @@ - Rationale - - +Rationale + + - - + + -
    Boost C++ Libraries
    + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore

    +

    + + Error handling rationale -

    +

    The library does not define the required members of class templates in case of an error. This technique causes the compiler to stop displaying diagnostics @@ -33,10 +41,10 @@ The library's components have limited error conditions, so problematic input can be spotted easily.

    -

    - - Why MPL Sequences? -

    +

    + + Why MPL Sequences? +

    MPL provides algorithms on Sequences, so transformations (such as turning by-value parameter types into const references for optimized forwarding or computing @@ -46,23 +54,20 @@ other Boost libraries (most importantly Fusion), so another reason is interoperability.

    -

    - - Pointer +

    + + Pointer to member object types -

    +

    Despite their syntax, pointer to member object types can be seen as dereferencing - functionals. A reference is not added to the - "result", however, to allow greater flexibility (once a reference - has been added there's no way to determine whether the referencee was a reference - already). + functionals.

    -

    - - The +

    + + The ClassTransform template parameter -

    +

    This-pointer, this-reference or just the object (or maybe even a smart pointer to the object) plus adjustments of @@ -75,10 +80,10 @@ client to adjust the class type before the sequence is formed and then treat all parameters uniformly.

    -

    - - Why tag types? -

    +

    + + Why tag types? +

    Let's consider the alternatives.

    @@ -94,12 +99,12 @@ parameters do not work within MPL lambda expressions and can cause problems with older compilers.

    -

    - - Is +

    + + Is it safe to have the synthesis templates take a callable builtin type or an MPL sequence as the first template argument? -

    +

    Yes, but it isn't immediately obvious as the set of possible MPL sequences isn't inherently disjoint from the set of callable builtin types. @@ -109,25 +114,23 @@ idea, because builtin types are accessible before the headers that make the type a sequence have been included, which can easily violate the ODR.

    -

    - - Why +

    + + Why does the hidden this parameter count for the function arity of member functions? -

    +

    It was found preferable that the following condition holds:

    -mpl::size< parameter_types<T> >::value == function_arity<T>::value
    +mpl::size< parameter_types<T> >::value == function_arity<T>::value
     
    -

    - - Why +

    + + Why ignore top-level cv-qualifiers on pointers? -

    +

    A cv-qualified pointer is still a pointer. It usually doesn't matter and even if it does, it's a job for Boost.TypeTraits. @@ -135,11 +138,15 @@ - +
    Copyright © 2004 -2007 Tobias Schwinger


    diff --git a/doc/html/boost_functiontypes/reference.html b/doc/html/boost_functiontypes/reference.html index 8529eba..eacf2d4 100644 --- a/doc/html/boost_functiontypes/reference.html +++ b/doc/html/boost_functiontypes/reference.html @@ -1,24 +1,31 @@ - Reference - - +Reference + + - - + + -
    Boost C++ Libraries
    + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore

    - +
    Copyright © 2004 -2007 Tobias Schwinger

    diff --git a/doc/html/boost_functiontypes/reference/classification.html b/doc/html/boost_functiontypes/reference/classification.html index 4d0cb94..2f49b79 100644 --- a/doc/html/boost_functiontypes/reference/classification.html +++ b/doc/html/boost_functiontypes/reference/classification.html @@ -1,27 +1,32 @@ - Class - templates for type classification - - +Class templates for type classification + + - - - + + + -
    Boost C++ Libraries
    + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore

    is_function
    @@ -42,12 +47,11 @@
    -template<typename T, typename Tag = null_tag>
    +template<typename T, typename Tag = null_tag>
     struct is_function;
     

    @@ -60,23 +64,23 @@

    T
    -
    - Type to analyze -
    +

    + Type to analyze +

    Tag
    -
    - Further properties required for a positive result -
    +

    + Further properties required for a positive result +

    is_function<T,Tag>
    -
    - Predicate value as MPL - - Integral - Constant -
    +

    + Predicate value as MPL + - Integral + Constant +

    is_function<T,Tag>::value
    -
    - Constant boolean value -
    +

    + Constant boolean value +

    @@ -86,12 +90,11 @@

    -template<typename T, typename Tag = null_tag>
    +template<typename T, typename Tag = null_tag>
     struct is_function_pointer;
     

    @@ -104,21 +107,23 @@

    T
    -
    - Type to analyze -
    +

    + Type to analyze +

    Tag
    -
    - Further properties required for a positive result -
    +

    + Further properties required for a positive result +

    is_function_pointer<T,Tag>
    -
    - Predicate value MPL - Integral Constant -
    +

    + Predicate value MPL - + Integral + Constant +

    is_function_pointer<T,Tag>::value
    -
    - Constant boolean value -
    +

    + Constant boolean value +

    @@ -128,12 +133,11 @@

    -template<typename T, typename Tag = null_tag>
    +template<typename T, typename Tag = null_tag>
     struct is_function_reference;
     

    @@ -146,21 +150,23 @@

    T
    -
    - Type to analyze -
    +

    + Type to analyze +

    Tag
    -
    - Further properties required for a positive result -
    +

    + Further properties required for a positive result +

    is_function_reference<T,Tag>
    -
    - Predicate value MPL - Integral Constant -
    +

    + Predicate value MPL - + Integral + Constant +

    is_function_reference<T,Tag>::value
    -
    - Constant boolean value -
    +

    + Constant boolean value +

    @@ -170,12 +176,11 @@

    -template<typename T, typename Tag = null_tag>
    +template<typename T, typename Tag = null_tag>
     struct is_member_pointer;
     

    @@ -188,21 +193,23 @@

    T
    -
    - Type to analyze -
    +

    + Type to analyze +

    Tag
    -
    - Further properties required for a positive result -
    +

    + Further properties required for a positive result +

    is_member_pointer<T,Tag>
    -
    - Predicate value MPL - Integral Constant -
    +

    + Predicate value MPL - + Integral + Constant +

    is_member_pointer<T,Tag>::value
    -
    - Constant boolean value -
    +

    + Constant boolean value +

    @@ -212,9 +219,9 @@

     template<typename T>
     struct is_member_object_pointer;
    @@ -229,17 +236,19 @@
     

    T
    -
    - Type to analyze -
    +

    + Type to analyze +

    is_member_object_pointer<T>
    -
    - Predicate value MPL - Integral Constant -
    +

    + Predicate value MPL - + Integral + Constant +

    is_member_object_pointer<T>::value
    -
    - Constant boolean value -
    +

    + Constant boolean value +

    @@ -248,12 +257,11 @@

    -template<typename T, typename Tag = null_tag>
    +template<typename T, typename Tag = null_tag>
     struct is_member_function_pointer;
     

    @@ -266,21 +274,23 @@

    T
    -
    - Type to analyze -
    +

    + Type to analyze +

    Tag
    -
    - Further properties required for a positive result -
    +

    + Further properties required for a positive result +

    is_member_function_pointer<T,Tag>
    -
    - Predicate value MPL - Integral Constant -
    +

    + Predicate value MPL - + Integral + Constant +

    is_member_function_pointer<T,Tag>::value
    -
    - Constant boolean value -
    +

    + Constant boolean value +

    @@ -290,12 +300,11 @@

    -template<typename T, typename Tag = null_tag>
    +template<typename T, typename Tag = null_tag>
     struct is_callable_builtin;
     

    @@ -308,23 +317,23 @@

    T
    -
    - Type to analyze -
    +

    + Type to analyze +

    Tag
    -
    - Further properties required for a positive result -
    +

    + Further properties required for a positive result +

    is_callable_builtin<T,Tag>
    -
    - Predicate value as MPL - - Integral - Constant -
    +

    + Predicate value as MPL + - Integral + Constant +

    is_callable_builtin<T,Tag>::value
    -
    - Constant boolean value -
    +

    + Constant boolean value +

    @@ -334,12 +343,11 @@

    -template<typename T, typename Tag = null_tag>
    +template<typename T, typename Tag = null_tag>
     struct is_nonmember_callable_builtin;
     

    @@ -352,23 +360,23 @@

    T
    -
    - Type to analyze -
    +

    + Type to analyze +

    Tag
    -
    - Further properties required for a positive result -
    +

    + Further properties required for a positive result +

    is_nonmember_callable_builtin<T,Tag>
    -
    - Predicate value as MPL - - Integral - Constant -
    +

    + Predicate value as MPL + - Integral + Constant +

    is_nonmember_callable_builtin<T,Tag>::value
    -
    - Constant boolean value -
    +

    + Constant boolean value +

    @@ -380,11 +388,15 @@ - +
    Copyright © 2004 -2007 Tobias Schwinger


    diff --git a/doc/html/boost_functiontypes/reference/decomposition.html b/doc/html/boost_functiontypes/reference/decomposition.html index 00f9b32..b4447e4 100644 --- a/doc/html/boost_functiontypes/reference/decomposition.html +++ b/doc/html/boost_functiontypes/reference/decomposition.html @@ -1,28 +1,32 @@ - Class templates - for type decomposition - - +Class templates for type decomposition + + - - - + + + -
    Boost C++ Libraries
    + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore

    result_type
    @@ -35,9 +39,9 @@
     template<typename F>
     struct result_type;
    @@ -52,13 +56,13 @@
     

    F
    -
    - Type to analyze -
    +

    + Type to analyze +

    result_type<F>::type
    -
    - Result type of F -
    +

    + Result type of F +

    @@ -71,9 +75,9 @@

     template<typename F, class ClassTransform = add_reference<_> >
     struct parameter_types;
    @@ -88,23 +92,23 @@
     

    F
    -
    - Type to analyze -
    +

    + Type to analyze +

    ClassTransform
    -
    -MPL - Lambda - Expression to transform the class type if F - is a member function pointer -
    +

    + MPL - Lambda + Expression to transform the class type if F + is a member function pointer +

    parameter_types<F,ClassTransform>
    -
    -MPL - Front - / Back - Extensible - Random - Access Sequence of parameter types -
    +

    + MPL - Front + / Back + Extensible + Random + Access Sequence of parameter types +

    @@ -117,9 +121,9 @@

     template<typename F>
     struct function_arity;
    @@ -134,19 +138,19 @@
     

    F
    -
    - Callable builtin type -
    +

    + Callable builtin type +

    function_arity<F>
    -
    - Function arity as MPL - - Integral - Constant -
    +

    + Function arity as MPL + - Integral + Constant +

    function_arity<F>::value
    -
    - Constant value of the function arity -
    +

    + Constant value of the function arity +

    @@ -162,9 +166,9 @@

     template<typename T, class ClassTransform = add_reference<_> >
     struct components;
    @@ -179,27 +183,27 @@
     

    T
    -
    - Type to analyze -
    +

    + Type to analyze +

    ClassTransform
    -
    -MPL - Lambda - Expression to transform the class type if T - is a member function pointer -
    +

    + MPL - Lambda + Expression to transform the class type if T + is a member function pointer +

    components<T,ClassTransform>
    -
    -MPL - Front - / Back - Extensible - Random - Access Sequence of all component types and property tag -
    +

    + MPL - Front + / Back + Extensible + Random + Access Sequence of all component types and property tag +

    components<T,ClassTransform>::types
    -
    - Decorated MPL Sequence, exposed for optimization -
    +

    + Decorated MPL Sequence, exposed for optimization +

    @@ -209,18 +213,21 @@

    If T is no callable builtin type, the component types - are an empty sequence and the Tag's meaning is equivalent to the null_tag. + are an empty sequence and the Tag's meaning is equivalent to the null_tag.

    - +
    Copyright © 2004 -2007 Tobias Schwinger

    diff --git a/doc/html/boost_functiontypes/reference/macros.html b/doc/html/boost_functiontypes/reference/macros.html index adeef85..ea3f1eb 100644 --- a/doc/html/boost_functiontypes/reference/macros.html +++ b/doc/html/boost_functiontypes/reference/macros.html @@ -1,23 +1,31 @@ - Macros - - +Macros + + - - - + + + -
    Boost C++ Libraries
    + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore

    BOOST_FT_MAX_ARITY
    @@ -40,9 +48,9 @@

    Expands to a numeric value that describes the maximum function arity supported by the library. @@ -59,17 +67,16 @@

    Expands to a sequence of ternary tuples (these data types are defined in the documentation of the Boost Preprocessor library). Each sequence element describes one calling convention specifier. The first element in each tuple is the - macro suffix for BOOST_FT_CC_*, + macro suffix for BOOST_FT_CC_*, the second element is the name of the tag that describes the calling convention and the third is the name of the specifier. The specifier is allowed to be an empty string, so the third tuple element is either BOOST_PP_EMPTY @@ -99,15 +106,13 @@

    - Enables a specific calling convention. * dentoes the macro suffix, as defined - by BOOST_FT_CC_NAMES - or BOOST_FT_BUILTIN_CC_NAMES. + Enables a specific calling convention. * denotes the macro suffix, as defined + by BOOST_FT_CC_NAMES + or BOOST_FT_BUILTIN_CC_NAMES.

    The macro expands to a list of restrictions, separated by the | @@ -142,9 +147,9 @@

    Defining this macro causes the following macros to be defined, if not defined already: @@ -157,9 +162,9 @@

    This macro allows to change the syntax of callable builtin types. It is useful to handle the compiler specific placement of the calling convention @@ -175,9 +180,9 @@

    Set to void for compilers that insist on a void parameter for nullary function types, empty by default. @@ -185,9 +190,9 @@

    Disables support for cv-qualified function types. Cv-qualified function types are illegal by the current standard version, but there is a pending @@ -202,9 +207,9 @@

    Makes the compiler preprocess as much as possible of the library code (rather than loading already-preprocessed header files) if defined. @@ -212,28 +217,31 @@

    Makes the compiler preprocess the loop over possible names for custom calling conventions (rather than loading an already-preprocessed header file) if defined.

    - This macro is defined automatically if BOOST_FT_CC_NAMES + This macro is defined automatically if BOOST_FT_CC_NAMES has been defined.

    - +
    Copyright © 2004 -2007 Tobias Schwinger

    diff --git a/doc/html/boost_functiontypes/reference/synthesis.html b/doc/html/boost_functiontypes/reference/synthesis.html index 975dcf5..fdf12ab 100644 --- a/doc/html/boost_functiontypes/reference/synthesis.html +++ b/doc/html/boost_functiontypes/reference/synthesis.html @@ -1,27 +1,32 @@ - Class templates - for type synthesis - - +Class templates for type synthesis + + - - - + + + -
    Boost C++ Libraries
    + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore

    function_type
    @@ -34,12 +39,11 @@
    -template<typename Types, typename Tag = null_tag> 
    +template<typename Types, typename Tag = null_tag> 
     struct function_type;
     

    @@ -52,19 +56,19 @@

    Types
    -
    - Component types in form of an MPL - - Forward - Sequence or another callable, builtin type -
    +

    + Component types in form of an MPL + - Forward + Sequence or another callable, builtin type +

    Tag
    -
    - Further properties -
    +

    + Further properties +

    function_type<Types,Tag>::type
    -
    - Synthesized type -
    +

    + Synthesized type +

    @@ -77,12 +81,11 @@

    -template<typename Types, typename Tag = null_tag> 
    +template<typename Types, typename Tag = null_tag> 
     struct function_pointer;
     

    @@ -95,19 +98,19 @@

    Types
    -
    - Component types in form of an MPL - - Forward - Sequence or another callable, builtin type -
    +

    + Component types in form of an MPL + - Forward + Sequence or another callable, builtin type +

    Tag
    -
    - Further properties -
    +

    + Further properties +

    function_pointer<Types,Tag>::type
    -
    - Synthesized type -
    +

    + Synthesized type +

    @@ -120,12 +123,11 @@

    -template<typename Types, typename Tag = null_tag> 
    +template<typename Types, typename Tag = null_tag> 
     struct function_reference;
     

    @@ -138,19 +140,19 @@

    Types
    -
    - Component types in form of an MPL - - Forward - Sequence or another callable, builtin type -
    +

    + Component types in form of an MPL + - Forward + Sequence or another callable, builtin type +

    Tag
    -
    - Further properties -
    +

    + Further properties +

    function_reference<Types,Tag>::type
    -
    - Synthesized type -
    +

    + Synthesized type +

    @@ -163,12 +165,11 @@

    -template<typename Types, typename Tag = null_tag> 
    +template<typename Types, typename Tag = null_tag> 
     struct member_function_pointer;
     

    @@ -181,19 +182,19 @@

    Types
    -
    - Component types in form of an MPL - - Forward - Sequence or another callable, builtin type -
    +

    + Component types in form of an MPL + - Forward + Sequence or another callable, builtin type +

    Tag
    -
    - Further properties -
    +

    + Further properties +

    member_function_pointer<Types,Tag>::type
    -
    - Synthesized type -
    +

    + Synthesized type +

    @@ -213,11 +214,15 @@ - +
    Copyright © 2004 -2007 Tobias Schwinger


    diff --git a/doc/html/boost_functiontypes/reference/tag_types.html b/doc/html/boost_functiontypes/reference/tag_types.html index 2280b65..847d74f 100644 --- a/doc/html/boost_functiontypes/reference/tag_types.html +++ b/doc/html/boost_functiontypes/reference/tag_types.html @@ -1,24 +1,31 @@ - Tag Types - - +Tag Types + + - - - + + + -
    Boost C++ Libraries
    + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore

    variadic
    @@ -47,9 +54,9 @@
     typedef unspecified variadic;
     
    @@ -66,9 +73,9 @@
     typedef unspecified non_variadic;
     
    @@ -84,9 +91,9 @@
     typedef unspecified default_cc;
     
    @@ -102,9 +109,9 @@
     typedef unspecified const_qualified;
     
    @@ -120,9 +127,9 @@
     typedef unspecified non_const;
     
    @@ -138,9 +145,9 @@
     typedef unspecified volatile_qualified;
     
    @@ -156,9 +163,9 @@
     typedef unspecified non_volatile;
     
    @@ -174,7 +181,8 @@
     typedef unspecified non_cv;
     
    @@ -192,9 +200,9 @@
     typedef unspecified const_non_volatile;
     
    @@ -212,9 +220,9 @@
     typedef unspecified volatile_non_const;
     
    @@ -232,9 +240,9 @@
     typedef unspecified cv_qualified;
     
    @@ -252,9 +260,9 @@
     typedef unspecified null_tag;
     
    @@ -270,7 +278,8 @@
    + tag +
     template<class Tag1, class Tag2, 
         class Tag3 = null_tag, class Tag4 = null_tag>
    @@ -286,13 +295,13 @@
     

    TagN
    -
    - Property tag -
    +

    + Property tag +

    tag<Tag1,Tag2...>
    -
    - Compound property tag -
    +

    + Compound property tag +

    @@ -303,11 +312,15 @@ - +
    Copyright © 2004 -2007 Tobias Schwinger


    diff --git a/doc/html/boost_functiontypes/use_cases.html b/doc/html/boost_functiontypes/use_cases.html index a99b5fd..8cee449 100644 --- a/doc/html/boost_functiontypes/use_cases.html +++ b/doc/html/boost_functiontypes/use_cases.html @@ -1,23 +1,31 @@ - Use Cases - - +Use Cases + + - - + + -
    Boost C++ Libraries
    + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore

    Generic libraries that accept callable arguments are common in C++. Accepting a callable argument of builin type often involves a lot of repetitive code @@ -136,8 +144,7 @@ arguments from a type sequence in a single expression:

    -static_cast<function_pointer<Seq>::type>(& overloaded)
    +static_cast<function_pointer<Seq>::type>(& overloaded)
     

    This technique can be occasionally more flexible than template argument deduction @@ -158,11 +165,15 @@ - +
    Copyright © 2004 -2007 Tobias Schwinger


    diff --git a/doc/html/index.html b/doc/html/index.html index 9d47b78..c95f3f7 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -2,22 +2,32 @@ Chapter 1. Boost.FunctionTypes 2.5 - - + + - + -
    Boost C++ Libraries
    + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore

    - +
    Next

    Chapter 1. Boost.FunctionTypes 2.5

    +

    +Tobias Schwinger +

    -

    +

    Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

    @@ -36,10 +46,10 @@
    - - + +

    Last revised: May 13, 2007 at 14:01:00 GMT

    Last revised: March 14, 2008 at 18:36:46 +0000


    - +
    Next
    diff --git a/example/fast_mem_fn_example.cpp b/example/fast_mem_fn_example.cpp index efe66a1..381ee14 100644 --- a/example/fast_mem_fn_example.cpp +++ b/example/fast_mem_fn_example.cpp @@ -101,7 +101,11 @@ int main() setup_test(v); t.restart(); +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1400) do_test(v, BOOST_EXAMPLE_FAST_MEM_FN(& test::id)); +#else // MSVC<8 does not like the implementation of the deduction macro: + do_test(v, ::example::fast_mem_fn< int (test::*)() const, & test::id >()); +#endif time1 = t.elapsed(); std::cout << "fast_mem_fn | " << time1 << std::endl; diff --git a/example/interface_example.cpp b/example/interface_example.cpp index d4f66bb..6b7f8d9 100644 --- a/example/interface_example.cpp +++ b/example/interface_example.cpp @@ -8,6 +8,7 @@ // See interface.hpp in this directory for details. #include +#include #include "interface.hpp" diff --git a/example/interpreter.hpp b/example/interpreter.hpp index 20e0c2f..72cd78b 100644 --- a/example/interpreter.hpp +++ b/example/interpreter.hpp @@ -14,11 +14,11 @@ // ========================== // // When a function is registered, an 'invoker' template is instantiated with -// the function's type. The 'invoker' fetches a value from the 'token_parser' +// the function's type. The 'invoker' fetches a value from the 'token_parser' // for each parameter of the function into a tuple and finally invokes the the // function with these values as arguments. The invoker's entrypoint, which // is a function of the callable builtin that describes the function to call and -// a reference to the 'token_parser', is partially bound to the registered +// a reference to the 'token_parser', is partially bound to the registered // function and put into a map so it can be found by name during parsing. #include @@ -36,9 +36,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -58,7 +58,7 @@ namespace example class interpreter { - class token_parser; + class token_parser; typedef boost::function invoker_function; typedef std::map dictionary; @@ -66,7 +66,7 @@ namespace example public: // Registers a function with the interpreter. template - typename boost::enable_if< ft::is_nonmember_callable_builtin + typename boost::enable_if< ft::is_nonmember_callable_builtin >::type register_function(std::string const & name, Function f); // Parse input for functions to call. @@ -76,13 +76,13 @@ namespace example template< typename Function , class From = typename mpl::begin< ft::parameter_types >::type , class To = typename mpl::end< ft::parameter_types >::type - > + > struct invoker; }; class interpreter::token_parser { - typedef boost::token_iterator_generator< + typedef boost::token_iterator_generator< boost::char_separator >::type token_iterator; token_iterator itr_at, itr_to; @@ -101,7 +101,7 @@ namespace example // Returns a token of given type. // We just apply boost::lexical_cast to whitespace separated string tokens // for simplicity. - template + template typename remove_cv_ref::type get() { if (! this->has_more_tokens()) @@ -111,8 +111,8 @@ namespace example { typedef typename remove_cv_ref::type result_type; result_type result = boost::lexical_cast - ::type>(*this->itr_at); - ++this->itr_at; + ::type>(*this->itr_at); + ++this->itr_at; return result; } @@ -129,12 +129,13 @@ namespace example { // add an argument to a Fusion cons-list for each parameter type template - static inline + static inline void apply(Function func, token_parser & parser, Args const & args) { typedef typename mpl::deref::type arg_type; + typedef typename mpl::next::type next_iter_type; - invoker::type, To>::apply + interpreter::invoker::apply ( func, parser, fusion::push_back(args, parser.get()) ); } }; @@ -144,7 +145,7 @@ namespace example { // the argument list is complete, now call the function template - static inline + static inline void apply(Function func, token_parser &, Args const & args) { fusion::invoke(func,args); @@ -156,7 +157,7 @@ namespace example interpreter::register_function(std::string const & name, Function f) { // instantiate and store the invoker by name - this->map_invokers[name] = boost::bind( + this->map_invokers[name] = boost::bind( & invoker::template apply, f,_1,fusion::nil() ); } @@ -177,9 +178,9 @@ namespace example // look up function dictionary::const_iterator entry = map_invokers.find( func_name ); if (entry == map_invokers.end()) - throw std::runtime_error("unknown function: " + func_name); - - // call the invoker which controls argument parsing + throw std::runtime_error("unknown function: " + func_name); + + // call the invoker which controls argument parsing entry->second(parser); } } diff --git a/include/boost/function_types/components.hpp b/include/boost/function_types/components.hpp index b975307..a4432c5 100644 --- a/include/boost/function_types/components.hpp +++ b/include/boost/function_types/components.hpp @@ -120,13 +120,14 @@ namespace boost template < typename Components , typename IfTagged - , typename ThenTag + , typename ThenTag + , typename DefaultBase = components_non_func_base > struct retagged_if : mpl::if_ < detail::represents_impl , detail::changed_tag - , components_non_func_base + , DefaultBase >::type { }; @@ -213,14 +214,71 @@ namespace boost : components_impl { }; -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x565)) + + template + struct member_obj_ptr_result + { typedef T & type; }; + + template + struct member_obj_ptr_result + { typedef T const & type; }; + + template + struct member_obj_ptr_result + { typedef T volatile & type; }; + + template + struct member_obj_ptr_result + { typedef T const volatile & type; }; + + template + struct member_obj_ptr_result + { typedef T & type; }; + + template + struct member_obj_ptr_result + { typedef T & type; }; + + template + struct member_obj_ptr_result + { typedef T & type; }; + + template + struct member_obj_ptr_result + { typedef T & type; }; + + template + struct member_obj_ptr_components + : member_object_pointer_base + { + typedef function_types::components type; + typedef components_mpl_sequence_tag tag; + + typedef mpl::integral_c function_arity; + + typedef mpl::vector2< typename detail::member_obj_ptr_result::type, + typename detail::class_transform::type > types; + }; + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x565)) +# define BOOST_FT_variations BOOST_FT_pointer|BOOST_FT_member_pointer + + template + struct components_impl + : member_obj_ptr_components + { }; + +#else +# define BOOST_FT_variations BOOST_FT_pointer + // This workaround removes the member pointer from the type to allow // detection of member function pointers with BCC. template struct components_impl : detail::retagged_if < detail::components_impl::type *, L> - , pointer_tag, /* --> */ member_pointer_tag > + , pointer_tag, /* --> */ member_function_pointer_tag + , member_obj_ptr_components > { }; // BCC lets us test the cv-qualification of a function type by template @@ -349,65 +407,13 @@ namespace boost struct components_bcc : mpl::if_ < detail::represents_impl< detail::components_impl - , member_pointer_tag> + , member_function_pointer_tag> , detail::mfp_components,T,OrigT,L> , detail::components_impl >::type { }; -// TODO: add data member support for Borland - -# define BOOST_FT_variations BOOST_FT_pointer -#else // end of BORLAND WORKAROUND -# define BOOST_FT_variations BOOST_FT_pointer|BOOST_FT_member_pointer - - template - struct member_obj_ptr_result - { typedef T & type; }; - - template - struct member_obj_ptr_result - { typedef T const & type; }; - - template - struct member_obj_ptr_result - { typedef T volatile & type; }; - - template - struct member_obj_ptr_result - { typedef T const volatile & type; }; - - template - struct member_obj_ptr_result - { typedef T & type; }; - - template - struct member_obj_ptr_result - { typedef T & type; }; - - template - struct member_obj_ptr_result - { typedef T & type; }; - - template - struct member_obj_ptr_result - { typedef T & type; }; - - - template - struct components_impl - : member_object_pointer_base - { - typedef function_types::components type; - typedef components_mpl_sequence_tag tag; - - typedef mpl::integral_c function_arity; - - typedef mpl::vector2< typename detail::member_obj_ptr_result::type, - typename detail::class_transform::type > types; - }; - -#endif +#endif // end of BORLAND WORKAROUND #define BOOST_FT_al_path boost/function_types/detail/components_impl #include diff --git a/include/boost/function_types/config/compiler.hpp b/include/boost/function_types/config/compiler.hpp index b9c020f..151c856 100644 --- a/include/boost/function_types/config/compiler.hpp +++ b/include/boost/function_types/config/compiler.hpp @@ -18,33 +18,36 @@ # error "unsupported compiler version" # endif - // enable clrcall calling covention (call to .NET managed code) when - // compiling with /clr -# if BOOST_MSVC >= 1400 && defined(__cplusplus_cli) -# ifndef BOOST_FT_CC_CLRCALL -# define BOOST_FT_CC_CLRCALL callable_builtin -# endif -# endif +# ifdef BOOST_FT_AUTODETECT_CALLING_CONVENTIONS - // Intel x86 architecture specific calling conventions -# ifdef _M_IX86 -# define BOOST_FT_COMMON_X86_CCs callable_builtin -# if BOOST_MSVC < 1400 - // version 7.1 is missing a keyword to specify the thiscall cc ... -# ifndef BOOST_FT_CC_IMPLICIT_THISCALL -# define BOOST_FT_CC_IMPLICIT_THISCALL non_variadic|member|callable_builtin -# ifndef BOOST_FT_CONFIG_OK -# pragma message("INFO| /Gd /Gr /Gz will compiler options will cause") -# pragma message("INFO| a compile error.") -# pragma message("INFO| Reconfigure Boost.FunctionTypes in this case.") -# pragma message("INFO| This message can be suppressed by defining") -# pragma message("INFO| BOOST_FT_CONFIG_OK.") + // enable clrcall calling covention (call to .NET managed code) when + // compiling with /clr +# if BOOST_MSVC >= 1400 && defined(__cplusplus_cli) +# ifndef BOOST_FT_CC_CLRCALL +# define BOOST_FT_CC_CLRCALL callable_builtin # endif -# endif -# else - // ...introduced in version 8 -# ifndef BOOST_FT_CC_THISCALL -# define BOOST_FT_CC_THISCALL non_variadic|member|callable_builtin +# endif + + // Intel x86 architecture specific calling conventions +# ifdef _M_IX86 +# define BOOST_FT_COMMON_X86_CCs callable_builtin +# if BOOST_MSVC < 1400 + // version 7.1 is missing a keyword to specify the thiscall cc ... +# ifndef BOOST_FT_CC_IMPLICIT_THISCALL +# define BOOST_FT_CC_IMPLICIT_THISCALL non_variadic|member|callable_builtin +# ifndef BOOST_FT_CONFIG_OK +# pragma message("INFO| /Gd /Gr /Gz will compiler options will cause") +# pragma message("INFO| a compile error.") +# pragma message("INFO| Reconfigure Boost.FunctionTypes in this case.") +# pragma message("INFO| This message can be suppressed by defining") +# pragma message("INFO| BOOST_FT_CONFIG_OK.") +# endif +# endif +# else + // ...introduced in version 8 +# ifndef BOOST_FT_CC_THISCALL +# define BOOST_FT_CC_THISCALL non_variadic|member|callable_builtin +# endif # endif # endif # endif @@ -55,32 +58,37 @@ # error "unsupported compiler version" # endif -# if defined(__i386__) -# // see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20439 -# // see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29328 -# if BOOST_WORKAROUND(__GNUC__,BOOST_TESTED_AT(4)) -# ifndef BOOST_FT_CC_IMPLICIT -# define BOOST_FT_CC_IMPLICIT member|callable_builtin +# ifdef BOOST_FT_AUTODETECT_CALLING_CONVENTIONS + +# if defined(__i386__) +# // see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20439 +# // see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29328 +# if BOOST_WORKAROUND(__GNUC__,BOOST_TESTED_AT(4)) +# ifndef BOOST_FT_CC_IMPLICIT +# define BOOST_FT_CC_IMPLICIT member|callable_builtin +# endif +# define BOOST_FT_COMMON_X86_CCs non_member|callable_builtin +# else +# define BOOST_FT_COMMON_X86_CCs callable_builtin # endif -# define BOOST_FT_COMMON_X86_CCs non_member|callable_builtin # else -# define BOOST_FT_COMMON_X86_CCs callable_builtin -# endif -# else -# ifndef BOOST_FT_CC_IMPLICIT -# define BOOST_FT_CC_IMPLICIT callable_builtin +# ifndef BOOST_FT_CC_IMPLICIT +# define BOOST_FT_CC_IMPLICIT callable_builtin +# endif # endif # endif -# // TODO: straighten out this hack -# ifndef __cdecl -# define __cdecl __attribute__((__cdecl__)) +# if (defined(BOOST_FT_CC_CDECL) || defined(BOOST_FT_COMMON_X86_CCs)) \ + && !defined(__cdecl) +# define __cdecl __attribute__((__cdecl__)) # endif -# ifndef __stdcall -# define __stdcall __attribute__((__stdcall__)) +# if (defined(BOOST_FT_CC_STDCALL) || defined(BOOST_FT_COMMON_X86_CCs)) \ + && !defined(__stdcall) +# define __stdcall __attribute__((__stdcall__)) # endif -# ifndef __fastcall -# define __fastcall __attribute__((__fastcall__)) +# if (defined(BOOST_FT_CC_FASTCALL) || defined(BOOST_FT_COMMON_X86_CCs)) \ + && !defined(__fastcall) +# define __fastcall __attribute__((__fastcall__)) # endif #elif defined(__BORLANDC__) @@ -91,7 +99,9 @@ # pragma message("WARNING: library untested with this compiler version") # endif -# define BOOST_FT_COMMON_X86_CCs callable_builtin +# ifdef BOOST_FT_AUTODETECT_CALLING_CONVENTIONS +# define BOOST_FT_COMMON_X86_CCs callable_builtin +# endif // syntactic specialities of cc specifier # define BOOST_FT_SYNTAX(result,lparen,cc_spec,type_mod,name,rparen) \ diff --git a/include/boost/function_types/detail/cv_traits.hpp b/include/boost/function_types/detail/cv_traits.hpp index b48452d..242f45b 100644 --- a/include/boost/function_types/detail/cv_traits.hpp +++ b/include/boost/function_types/detail/cv_traits.hpp @@ -12,7 +12,8 @@ #include #include -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || BOOST_WORKAROUND(__BORLANDC__, <= 0x582) # include # include # include @@ -22,10 +23,8 @@ namespace boost { namespace function_types { namespace detail { -namespace ft = boost::function_types; - - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if ! (defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || BOOST_WORKAROUND(__BORLANDC__, <= 0x582)) template struct cv_traits { typedef non_cv tag; typedef T type; }; @@ -109,12 +108,13 @@ struct cv_code { static T _t; BOOST_STATIC_CONSTANT(std::size_t, value = - sizeof(ft::detail::switch_cv(ft::detail::ref_to_ptr(_t) ) )); + sizeof(::boost::function_types::detail::switch_cv( + ::boost::function_types::detail::ref_to_ptr(_t) ) )); }; template struct cv_traits { - typedef typename ft::detail::cv_tag_impl< + typedef typename boost::function_types::detail::cv_tag_impl< ::boost::function_types::detail::cv_code::value >::type tag; diff --git a/include/boost/function_types/detail/pp_arity_loop.hpp b/include/boost/function_types/detail/pp_arity_loop.hpp index 91dfb7c..b6dbff5 100644 --- a/include/boost/function_types/detail/pp_arity_loop.hpp +++ b/include/boost/function_types/detail/pp_arity_loop.hpp @@ -81,14 +81,16 @@ BOOST_PP_EXPAND(#) include BOOST_FT_AL_PREPROCESSED # include # endif +# define BOOST_FT_AL_INCLUDE_FILE + # define BOOST_FT_ARITY_LOOP_PREFIX 1 -# include BOOST_PP_EXPAND() +# include BOOST_FT_AL_INCLUDE_FILE # undef BOOST_FT_ARITY_LOOP_PREFIX # if !BOOST_PP_IS_ITERATING -# define BOOST_PP_FILENAME_1 +# define BOOST_PP_FILENAME_1 BOOST_FT_AL_INCLUDE_FILE # elif BOOST_PP_ITERATION_DEPTH() == 1 -# define BOOST_PP_FILENAME_2 +# define BOOST_PP_FILENAME_2 BOOST_FT_AL_INCLUDE_FILE # else # error "loops nested too deeply" # endif @@ -133,8 +135,10 @@ BOOST_PP_EXPAND(#) include BOOST_FT_AL_PREPROCESSED # undef BOOST_FT_type # define BOOST_FT_ARITY_LOOP_SUFFIX 1 -# include BOOST_PP_EXPAND() +# include BOOST_FT_AL_INCLUDE_FILE # undef BOOST_FT_ARITY_LOOP_SUFFIX + +# undef BOOST_FT_AL_INCLUDE_FILE # endif # undef BOOST_FT_FROM_ARITY diff --git a/include/boost/function_types/detail/pp_cc_loop/master.hpp b/include/boost/function_types/detail/pp_cc_loop/master.hpp index 49ffded..60e958c 100644 --- a/include/boost/function_types/detail/pp_cc_loop/master.hpp +++ b/include/boost/function_types/detail/pp_cc_loop/master.hpp @@ -37,6 +37,37 @@ # define BOOST_PP_ITERATION_LIMITS \ (0,BOOST_PP_SEQ_SIZE(BOOST_FT_CC_NAMES_SEQ)-1) # include BOOST_PP_ITERATE() +# if !defined(BOOST_FT_config_valid) && BOOST_FT_CC_PREPROCESSING +# define BOOST_FT_cc_id 1 +# define BOOST_FT_cc_name implicit_cc +# define BOOST_FT_cc BOOST_PP_EMPTY +# define BOOST_FT_cond callable_builtin +# include BOOST_FT_cc_file +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# elif !defined(BOOST_FT_config_valid) // and generating preprocessed file +BOOST_PP_EXPAND(#) ifndef BOOST_FT_config_valid +BOOST_PP_EXPAND(#) define BOOST_FT_cc_id 1 +BOOST_PP_EXPAND(#) define BOOST_FT_cc_name implicit_cc +BOOST_PP_EXPAND(#) define BOOST_FT_cc BOOST_PP_EMPTY +BOOST_PP_EXPAND(#) define BOOST_FT_cond callable_builtin +#define _() +BOOST_PP_EXPAND(#) include BOOST_FT_cc_file +#undef _ +BOOST_PP_EXPAND(#) undef BOOST_FT_cond +BOOST_PP_EXPAND(#) undef BOOST_FT_cc_name +BOOST_PP_EXPAND(#) undef BOOST_FT_cc +BOOST_PP_EXPAND(#) undef BOOST_FT_cc_id +BOOST_PP_EXPAND(#) else +BOOST_PP_EXPAND(#) undef BOOST_FT_config_valid +BOOST_PP_EXPAND(#) endif + +# else +# undef BOOST_FT_config_valid +# endif + # include # include @@ -53,7 +84,8 @@ # define BOOST_FT_cond BOOST_PP_CAT(BOOST_FT_CC_,BOOST_FT_cc_pp_name) # if BOOST_FT_cond -# include BOOST_PP_EXPAND() +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file # endif # undef BOOST_FT_cond @@ -87,8 +119,9 @@ BOOST_PP_EXPAND(#) define BOOST_FT_cond BOOST_FT_cc_cond_v # undef BOOST_FT_cc_inf BOOST_PP_EXPAND(#) if BOOST_FT_cond +BOOST_PP_EXPAND(#) define BOOST_FT_config_valid 1 #define _() -BOOST_PP_EXPAND(#) include BOOST_PP_EXPAND _()() +BOOST_PP_EXPAND(#) include BOOST_FT_cc_file #undef _ BOOST_PP_EXPAND(#) endif diff --git a/include/boost/function_types/detail/pp_cc_loop/preprocessed.hpp b/include/boost/function_types/detail/pp_cc_loop/preprocessed.hpp index 598de8a..da4079c 100644 --- a/include/boost/function_types/detail/pp_cc_loop/preprocessed.hpp +++ b/include/boost/function_types/detail/pp_cc_loop/preprocessed.hpp @@ -14,7 +14,8 @@ # define BOOST_FT_cc BOOST_PP_EMPTY # define BOOST_FT_cond BOOST_FT_CC_IMPLICIT # if BOOST_FT_cond -# include BOOST_PP_EXPAND ( ) +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file # endif # undef BOOST_FT_cond # undef BOOST_FT_cc_name @@ -25,7 +26,8 @@ # define BOOST_FT_cc BOOST_PP_IDENTITY(__cdecl ) # define BOOST_FT_cond BOOST_FT_CC_CDECL # if BOOST_FT_cond -# include BOOST_PP_EXPAND ( ) +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file # endif # undef BOOST_FT_cond # undef BOOST_FT_cc_name @@ -36,7 +38,8 @@ # define BOOST_FT_cc BOOST_PP_IDENTITY(__stdcall ) # define BOOST_FT_cond BOOST_FT_CC_STDCALL # if BOOST_FT_cond -# include BOOST_PP_EXPAND ( ) +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file # endif # undef BOOST_FT_cond # undef BOOST_FT_cc_name @@ -47,7 +50,8 @@ # define BOOST_FT_cc BOOST_PP_IDENTITY(pascal ) # define BOOST_FT_cond BOOST_FT_CC_PASCAL # if BOOST_FT_cond -# include BOOST_PP_EXPAND ( ) +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file # endif # undef BOOST_FT_cond # undef BOOST_FT_cc_name @@ -58,7 +62,8 @@ # define BOOST_FT_cc BOOST_PP_IDENTITY(__fastcall) # define BOOST_FT_cond BOOST_FT_CC_FASTCALL # if BOOST_FT_cond -# include BOOST_PP_EXPAND ( ) +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file # endif # undef BOOST_FT_cond # undef BOOST_FT_cc_name @@ -69,7 +74,8 @@ # define BOOST_FT_cc BOOST_PP_IDENTITY(__clrcall ) # define BOOST_FT_cond BOOST_FT_CC_CLRCALL # if BOOST_FT_cond -# include BOOST_PP_EXPAND ( ) +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file # endif # undef BOOST_FT_cond # undef BOOST_FT_cc_name @@ -80,7 +86,8 @@ # define BOOST_FT_cc BOOST_PP_IDENTITY(__thiscall) # define BOOST_FT_cond BOOST_FT_CC_THISCALL # if BOOST_FT_cond -# include BOOST_PP_EXPAND ( ) +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file # endif # undef BOOST_FT_cond # undef BOOST_FT_cc_name @@ -91,9 +98,23 @@ # define BOOST_FT_cc BOOST_PP_EMPTY # define BOOST_FT_cond BOOST_FT_CC_IMPLICIT_THISCALL # if BOOST_FT_cond -# include BOOST_PP_EXPAND ( ) +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file # endif # undef BOOST_FT_cond # undef BOOST_FT_cc_name # undef BOOST_FT_cc # undef BOOST_FT_cc_id +# ifndef BOOST_FT_config_valid +# define BOOST_FT_cc_id 1 +# define BOOST_FT_cc_name implicit_cc +# define BOOST_FT_cc BOOST_PP_EMPTY +# define BOOST_FT_cond 0x00000001 +# include BOOST_FT_cc_file +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# else +# undef BOOST_FT_config_valid +# endif diff --git a/include/boost/function_types/detail/pp_loop.hpp b/include/boost/function_types/detail/pp_loop.hpp index 7521cf2..7d8c347 100644 --- a/include/boost/function_types/detail/pp_loop.hpp +++ b/include/boost/function_types/detail/pp_loop.hpp @@ -28,9 +28,9 @@ #if defined(BOOST_FT_al_path) # define BOOST_FT_cc_file \ - boost/function_types/detail/pp_variate_loop/preprocessed.hpp + # define BOOST_FT_variate_file \ - boost/function_types/detail/pp_arity_loop.hpp + # ifndef BOOST_FT_type_function # define BOOST_FT_type_function(cc,name) BOOST_FT_SYNTAX( \ diff --git a/include/boost/function_types/detail/pp_retag_default_cc/master.hpp b/include/boost/function_types/detail/pp_retag_default_cc/master.hpp index f97d385..865efce 100644 --- a/include/boost/function_types/detail/pp_retag_default_cc/master.hpp +++ b/include/boost/function_types/detail/pp_retag_default_cc/master.hpp @@ -30,8 +30,8 @@ namespace detail # include BOOST_PP_ASSIGN_SLOT(1) BOOST_STATIC_CONSTANT(bits_t, value = ( - ::boost::function_types::detail::bits::value & BOOST_FT_default_cc - | ::boost::function_types::detail::bits::value & BOOST_PP_SLOT(1) + (::boost::function_types::detail::bits::value & BOOST_FT_default_cc) + | (::boost::function_types::detail::bits::value & BOOST_PP_SLOT(1)) )); }; diff --git a/include/boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp b/include/boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp index c21a4fd..72666d0 100644 --- a/include/boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp +++ b/include/boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp @@ -15,8 +15,8 @@ namespace detail template struct selector_bits { BOOST_STATIC_CONSTANT(bits_t, value = ( -::boost::function_types::detail::bits ::value & 0x00008000 -| ::boost::function_types::detail::bits ::value & 802 +(::boost::function_types::detail::bits ::value & 0x00008000) +| (::boost::function_types::detail::bits ::value & 802) )); }; template struct default_cc_tag; diff --git a/include/boost/function_types/detail/pp_tags/master.hpp b/include/boost/function_types/detail/pp_tags/master.hpp index 783b93c..9cce212 100644 --- a/include/boost/function_types/detail/pp_tags/master.hpp +++ b/include/boost/function_types/detail/pp_tags/master.hpp @@ -82,7 +82,7 @@ namespace detail { ); BOOST_STATIC_CONSTANT(bits_t, combined_bits = - LHS_bits & ~RHS_mask | RHS_bits + (LHS_bits & ~RHS_mask) | RHS_bits ); BOOST_STATIC_CONSTANT(bits_t, combined_mask = diff --git a/include/boost/function_types/detail/pp_tags/preprocessed.hpp b/include/boost/function_types/detail/pp_tags/preprocessed.hpp index 811d62a..823c3cc 100644 --- a/include/boost/function_types/detail/pp_tags/preprocessed.hpp +++ b/include/boost/function_types/detail/pp_tags/preprocessed.hpp @@ -53,7 +53,7 @@ BOOST_STATIC_CONSTANT(bool, match = RHS_bits == (LHS_bits & RHS_mask & (RHS_bits | ~0x000000ff)) ); BOOST_STATIC_CONSTANT(bits_t, combined_bits = -LHS_bits & ~RHS_mask | RHS_bits +(LHS_bits & ~RHS_mask) | RHS_bits ); BOOST_STATIC_CONSTANT(bits_t, combined_mask = LHS_mask | RHS_mask diff --git a/include/boost/function_types/detail/pp_variate_loop/master.hpp b/include/boost/function_types/detail/pp_variate_loop/master.hpp index cf27477..5026342 100644 --- a/include/boost/function_types/detail/pp_variate_loop/master.hpp +++ b/include/boost/function_types/detail/pp_variate_loop/master.hpp @@ -140,7 +140,7 @@ BOOST_PP_EXPAND(#) define BOOST_FT_cv const volatile # endif # endif BOOST_PP_EXPAND(#) define BOOST_FT_flags BOOST_PP_SLOT(1) -BOOST_PP_EXPAND(#) include BOOST_PP_EXPAND BOOST_PP_EMPTY()() +BOOST_PP_EXPAND(#) include BOOST_FT_variate_file BOOST_PP_EXPAND(#) undef BOOST_FT_cv BOOST_PP_EXPAND(#) undef BOOST_FT_ell diff --git a/include/boost/function_types/detail/pp_variate_loop/preprocessed.hpp b/include/boost/function_types/detail/pp_variate_loop/preprocessed.hpp index d87d519..7e7c4f9 100644 --- a/include/boost/function_types/detail/pp_variate_loop/preprocessed.hpp +++ b/include/boost/function_types/detail/pp_variate_loop/preprocessed.hpp @@ -15,7 +15,7 @@ # define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM # define BOOST_FT_cv # define BOOST_FT_flags 519 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -28,7 +28,7 @@ # define BOOST_FT_nullary_param # define BOOST_FT_cv # define BOOST_FT_flags 263 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -42,7 +42,7 @@ # define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM # define BOOST_FT_cv const # define BOOST_FT_flags 1543 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -55,7 +55,7 @@ # define BOOST_FT_nullary_param # define BOOST_FT_cv const # define BOOST_FT_flags 1287 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -68,7 +68,7 @@ # define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM # define BOOST_FT_cv volatile # define BOOST_FT_flags 2567 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -81,7 +81,7 @@ # define BOOST_FT_nullary_param # define BOOST_FT_cv volatile # define BOOST_FT_flags 2311 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -94,7 +94,7 @@ # define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM # define BOOST_FT_cv const volatile # define BOOST_FT_flags 3591 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -107,7 +107,7 @@ # define BOOST_FT_nullary_param # define BOOST_FT_cv const volatile # define BOOST_FT_flags 3335 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -123,7 +123,7 @@ # define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM # define BOOST_FT_cv # define BOOST_FT_flags 523 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -136,7 +136,7 @@ # define BOOST_FT_nullary_param # define BOOST_FT_cv # define BOOST_FT_flags 267 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -151,7 +151,7 @@ # define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM # define BOOST_FT_cv # define BOOST_FT_flags 531 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -164,7 +164,7 @@ # define BOOST_FT_nullary_param # define BOOST_FT_cv # define BOOST_FT_flags 275 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -181,7 +181,7 @@ # define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM # define BOOST_FT_cv # define BOOST_FT_flags 609 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -194,7 +194,7 @@ # define BOOST_FT_nullary_param # define BOOST_FT_cv # define BOOST_FT_flags 353 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -207,7 +207,7 @@ # define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM # define BOOST_FT_cv const # define BOOST_FT_flags 1633 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -220,7 +220,7 @@ # define BOOST_FT_nullary_param # define BOOST_FT_cv const # define BOOST_FT_flags 1377 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -233,7 +233,7 @@ # define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM # define BOOST_FT_cv volatile # define BOOST_FT_flags 2657 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -246,7 +246,7 @@ # define BOOST_FT_nullary_param # define BOOST_FT_cv volatile # define BOOST_FT_flags 2401 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -259,7 +259,7 @@ # define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM # define BOOST_FT_cv const volatile # define BOOST_FT_flags 3681 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param @@ -272,7 +272,7 @@ # define BOOST_FT_nullary_param # define BOOST_FT_cv const volatile # define BOOST_FT_flags 3425 -# include BOOST_PP_EXPAND ( ) +# include BOOST_FT_variate_file # undef BOOST_FT_cv # undef BOOST_FT_ell # undef BOOST_FT_nullary_param diff --git a/include/boost/function_types/is_member_object_pointer.hpp b/include/boost/function_types/is_member_object_pointer.hpp index fbf4850..77527d9 100644 --- a/include/boost/function_types/is_member_object_pointer.hpp +++ b/include/boost/function_types/is_member_object_pointer.hpp @@ -24,10 +24,10 @@ namespace boost < function_types::components , detail::member_object_pointer_tag > { - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_member_object_pointer,(T,Tag)) + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_member_object_pointer,(T)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_member_object_pointer) + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,function_types::is_member_object_pointer) } #endif diff --git a/include/boost/function_types/property_tags.hpp b/include/boost/function_types/property_tags.hpp index b241e1a..bbc64d5 100644 --- a/include/boost/function_types/property_tags.hpp +++ b/include/boost/function_types/property_tags.hpp @@ -141,7 +141,7 @@ template struct extract #include namespace boost { namespace function_types { -#define BOOST_FT_cc_file boost/function_types/detail/pp_tags/cc_tag.hpp +#define BOOST_FT_cc_file #include } } // namespace boost::function_types diff --git a/index.html b/index.html new file mode 100644 index 0000000..ee4ce6e --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + +

    Automatic redirection failed, please go to + doc/html/index.html.

    +

    Copyright Tobias Schwinger 2005-2007

    +

    Distributed under the Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt).

    + + + diff --git a/test/custom_ccs/member_ccs.cpp b/test/custom_ccs/member_ccs.cpp index 28e0c1a..11f9392 100644 --- a/test/custom_ccs/member_ccs.cpp +++ b/test/custom_ccs/member_ccs.cpp @@ -6,11 +6,17 @@ //------------------------------------------------------------------------------ +#define BOOST_FT_AUTODETECT_CALLING_CONVENTIONS + #include #include #include #include +#ifndef BOOST_FT_CC_STDCALL +# error "test not supported with this compiler/platform" +#endif + namespace ft = boost::function_types; namespace mpl = boost::mpl; diff --git a/test/custom_ccs/member_ccs_exact.cpp b/test/custom_ccs/member_ccs_exact.cpp index 381f69f..413b133 100644 --- a/test/custom_ccs/member_ccs_exact.cpp +++ b/test/custom_ccs/member_ccs_exact.cpp @@ -6,11 +6,17 @@ //------------------------------------------------------------------------------ +#define BOOST_FT_AUTODETECT_CALLING_CONVENTIONS + #include #include #include #include +#ifndef BOOST_FT_CC_STDCALL +# error "test not supported with this compiler/platform" +#endif + namespace ft = boost::function_types; namespace mpl = boost::mpl; diff --git a/test/custom_ccs/nonmember_ccs.cpp b/test/custom_ccs/nonmember_ccs.cpp index 18a73ff..81681ff 100644 --- a/test/custom_ccs/nonmember_ccs.cpp +++ b/test/custom_ccs/nonmember_ccs.cpp @@ -6,6 +6,8 @@ //------------------------------------------------------------------------------ +#define BOOST_FT_AUTODETECT_CALLING_CONVENTIONS + #include #include #include @@ -13,6 +15,10 @@ #include #include +#ifndef BOOST_FT_CC_STDCALL +# error "test not supported with this compiler/platform" +#endif + namespace ft = boost::function_types; namespace mpl = boost::mpl; diff --git a/test/custom_ccs/nonmember_ccs_exact.cpp b/test/custom_ccs/nonmember_ccs_exact.cpp index 808ded3..d6db300 100644 --- a/test/custom_ccs/nonmember_ccs_exact.cpp +++ b/test/custom_ccs/nonmember_ccs_exact.cpp @@ -6,6 +6,8 @@ //------------------------------------------------------------------------------ +#define BOOST_FT_AUTODETECT_CALLING_CONVENTIONS + #include #include #include @@ -13,6 +15,10 @@ #include #include +#ifndef BOOST_FT_CC_STDCALL +# error "test not supported with this compiler/platform" +#endif + namespace ft = boost::function_types; namespace mpl = boost::mpl; diff --git a/test/decomposition/parameter_types.cpp b/test/decomposition/parameter_types.cpp index 9255ca9..5feb1a8 100644 --- a/test/decomposition/parameter_types.cpp +++ b/test/decomposition/parameter_types.cpp @@ -24,7 +24,7 @@ typedef C (C::*mem_func_ptr)(C,int); typedef C (C::*c_mem_func_ptr)(C,C) const; typedef C (C::*v_mem_func_ptr)(C) volatile; typedef C (C::*cv_mem_func_ptr)() const volatile; - +typedef C C::*mem_ptr; BOOST_MPL_ASSERT(( mpl::equal< ft::parameter_types, mpl::vector > @@ -54,3 +54,6 @@ BOOST_MPL_ASSERT(( mpl::equal< ft::parameter_types, mpl::vector > )); +BOOST_MPL_ASSERT(( + mpl::equal< ft::parameter_types, mpl::vector > +));