diff --git a/faq.html b/doc/faq.html similarity index 91% rename from faq.html rename to doc/faq.html index d922646..d7dcefa 100644 --- a/faq.html +++ b/doc/faq.html @@ -5,7 +5,7 @@
-Yes, boost::function
is type safe even though it uses void pointers and pointers to functions returning void and taking no arguments. Essentially, all type information is encoded in the functions that manage and invoke function pointers and function objects. Only these functions are instantiated with the exact type that is pointed to by the void pointer or pointer to void function. The reason that both are required is that one may cast between void pointers and object pointers safely or between different types of function pointers (provided you don't invoke a function pointer with the wrong type).
@@ -35,13 +35,13 @@ void g() { return f(); }
In November and December of 2000, the issue of cloning vs. reference counting was debated at length and it was decided that cloning gave more predictable semantics. I won't rehash the discussion here, but if it cloning is incorrect for a particular application a reference-counting allocator could be used.
Member function assignments are not included directly in boost::function
because they do not conform to the syntax of function objects. Several libraries exist to wrap member functions in a function object and/or bind the first argument to the member function (the this
pointer). A few libraries are described in the Boost.Function documentation.
+
Member function assignments are not included directly in boost::function
because they do not conform to the syntax of function objects. Several libraries exist to wrap member functions in a function object and/or bind the first argument to the member function (the this
pointer). A few libraries are described in the Boost.Function documentation.