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.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 @@
Thanks go to the following people for supporting the development of this library
in one or the other way:
@@ -25,6 +33,9 @@
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
Templates that encapsulate properties that are single types contain a type
member called
Templates that encapsulate properties that are type lists model an MPL-compatible
type sequence.
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.
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.
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.
Let's consider the alternatives.
+
+
+Home
+Libraries
+People
+FAQ
+More
+
- 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 @@
-
+
+
+Home
+Libraries
+People
+FAQ
+More
+
- 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 @@
-
+
+
+Home
+Libraries
+People
+FAQ
+More
+
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
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
-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 @@
-
+
+
+Home
+Libraries
+People
+FAQ
+More
+
+
+
+ Error
handling rationale
-
+
-
- Why MPL Sequences?
-
+
+
+ Why MPL Sequences?
+
-
- Pointer
+
+
+
+ Pointer
to member object types
-
-
- 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?
+
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.
-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-
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 | +
![]() |
![]() |
+Home | +Libraries | +People | +FAQ | +More | +
- | Copyright © 2004 -2007 Tobias Schwinger | +
![]() |
![]() |
+Home | +Libraries | +People | +FAQ | +More | +
-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 +
Tag
+ Further properties required for a positive result +
is_function<T,Tag>
+ Predicate value as MPL + - Integral + Constant +
is_function<T,Tag>::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 +
Tag
+ Further properties required for a positive result +
is_function_pointer<T,Tag>
+ Predicate value MPL - + Integral + Constant +
is_function_pointer<T,Tag>::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 +
Tag
+ Further properties required for a positive result +
is_function_reference<T,Tag>
+ Predicate value MPL - + Integral + Constant +
is_function_reference<T,Tag>::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 +
Tag
+ Further properties required for a positive result +
is_member_pointer<T,Tag>
+ Predicate value MPL - + Integral + Constant +
is_member_pointer<T,Tag>::value
+ Constant boolean value +
@@ -212,9 +219,9 @@
template<typename T> struct is_member_object_pointer; @@ -229,17 +236,19 @@
T
+ Type to analyze +
is_member_object_pointer<T>
+ Predicate value MPL - + Integral + Constant +
is_member_object_pointer<T>::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 +
Tag
+ Further properties required for a positive result +
is_member_function_pointer<T,Tag>
+ Predicate value MPL - + Integral + Constant +
is_member_function_pointer<T,Tag>::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 +
Tag
+ Further properties required for a positive result +
is_callable_builtin<T,Tag>
+ Predicate value as MPL + - Integral + Constant +
is_callable_builtin<T,Tag>::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 +
Tag
+ Further properties required for a positive result +
is_nonmember_callable_builtin<T,Tag>
+ Predicate value as MPL + - Integral + Constant +
is_nonmember_callable_builtin<T,Tag>::value
+ Constant boolean value +
@@ -380,11 +388,15 @@
- | Copyright © 2004 -2007 Tobias Schwinger | +
![]() |
![]() |
+Home | +Libraries | +People | +FAQ | +More | +
template<typename F> struct result_type; @@ -52,13 +56,13 @@
F
+ Type to analyze +
result_type<F>::type
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 +
ClassTransform
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 +
@@ -117,9 +121,9 @@
template<typename F> struct function_arity; @@ -134,19 +138,19 @@
F
+ Callable builtin type +
function_arity<F>
+ Function arity as MPL + - Integral + Constant +
function_arity<F>::value
+ 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 +
ClassTransform
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 +
components<T,ClassTransform>::types
+ 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 | +
![]() |
![]() |
+Home | +Libraries | +People | +FAQ | +More | +
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 | +
![]() |
![]() |
+Home | +Libraries | +People | +FAQ | +More | +
-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 +
Tag
+ Further properties +
function_type<Types,Tag>::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 +
Tag
+ Further properties +
function_pointer<Types,Tag>::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 +
Tag
+ Further properties +
function_reference<Types,Tag>::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 +
Tag
+ Further properties +
member_function_pointer<Types,Tag>::type
+ Synthesized type +
@@ -213,11 +214,15 @@
- | Copyright © 2004 -2007 Tobias Schwinger | +
![]() |
![]() |
+Home | +Libraries | +People | +FAQ | +More | +
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 @@
template<class Tag1, class Tag2, class Tag3 = null_tag, class Tag4 = null_tag> @@ -286,13 +295,13 @@
TagN
+ Property tag +
tag<Tag1,Tag2...>
+ Compound property tag +
@@ -303,11 +312,15 @@
- | Copyright © 2004 -2007 Tobias Schwinger | +
![]() |
![]() |
+Home | +Libraries | +People | +FAQ | +More | +
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 | +
![]() |
![]() |
+Home | +Libraries | +People | +FAQ | +More | +
Copyright © 2004 -2007 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 |
+