diff --git a/doc/callable_traits.qbk b/doc/callable_traits.qbk
index 2891ccb..0407a59 100644
--- a/doc/callable_traits.qbk
+++ b/doc/callable_traits.qbk
@@ -55,7 +55,6 @@
[template concept_simple_invokable[][role green SimpleInvokable]]
[template concept_callable[][role green Callable]]
[template concept_invokable[][role green Invokable]]
-[template concept_bind_expression[][role green BindExpression]]
[template concept_signature[][role green Signature]]
[template concept_constexpr_constructible[][role green ConstexprDefaultConstructible]]
[template concept_cc_tag[][role green CallingConventionTag]]
@@ -76,7 +75,6 @@
[template link_simple_invokable[][link callable_traits.glossary.ref_simple_invokable [concept_simple_invokable]]]
[template link_callable[][link callable_traits.glossary.ref_callable [concept_callable]]]
[template link_invokable[][link callable_traits.glossary.ref_invokable [concept_invokable]]]
-[template link_bind_expression[][link callable_traits.glossary.ref_bind_expression [concept_bind_expression]]]
[template link_signature[][link callable_traits.glossary.ref_signature [concept_signature]]]
[template link_constexpr_constructible[][link callable_traits.glossary.ref_constexpr_constructible [concept_constexpr_constructible]]]
[template link_cc_tag[][link callable_traits.glossary.ref_cc_tag [concept_cc_tag]]]
@@ -94,7 +92,6 @@
[template link_arg_at[][link callable_traits.ref_arg_at [^arg_at]]]
[template link_args[][link callable_traits.ref_args [^args]]]
[template link_arity[][link callable_traits.ref_arity [^arity]]]
-[template link_bind[][link callable_traits.ref_bind [^bind]]]
[template link_is_invokable[][link callable_traits.ref_is_invokable [^is_invokable]]]
[template link_is_invokable_constexpr[][link callable_traits.ref_is_invokable_constexpr [^is_invokable_constexpr]]]
[template link_clear_args[][link callable_traits.ref_clear_args [^clear_args]]]
@@ -185,7 +182,6 @@ This documentation will be most beneficial to readers who posess a basic underst
* [@http://en.cppreference.com/w/cpp/language/overloaded_address taking the address of overloaded functions]
* [@http://en.cppreference.com/w/c/language/variadic C-style variadics], a.k.a. varargs
* [@https://en.wikipedia.org/wiki/X86_calling_conventions calling conventions]
-* [@http://en.cppreference.com/w/cpp/utility/functional/bind std::bind expressions] with [@http://en.cppreference.com/w/cpp/utility/functional/placeholders std::placeholders]
[endsect][/section:prereqs]
@@ -262,12 +258,6 @@ See Also: [link callable_traits.faq.faq_function_types Why not update and extend
[ [Windows] [MinGW GCC \[4.8, ~ 5.2.1)] [[partial_support]] [libstdc++] [-] ]
]
-[template msvc_disabled_functions[]
-
-
-* [link_bind]
-]
-
CallableTraits has not been tested on every platform under the sun. If you find CallableTraits to work with another toolchain, [link callable_traits.contact let us know!]
[section:compatibility_issues Known Issues]
@@ -275,9 +265,6 @@ CallableTraits has not been tested on every platform under the sun. If you find
* [link_is_constexpr] and [link_is_invokable_constexpr] always `std::false_type` on the following platforms:
* MSVC
* GCC < 5
-* [link_bind] trips a static_assert on the following platforms:
- * MSVC
- * GCC < 4.9.2
* [link_min_arity] and [link_max_arity] are equivalent to [link_arity] on the following platforms:
* GCC < 4.9.2
* [link_abominable] types are not compatible with some older compilers. Attempts to create [link_abominable] types using [libname] metafunctions will have no effect on the following platforms:
@@ -373,7 +360,7 @@ There are real reasons to write code like this, but they are few and far between
[*6.] [link_is_constexpr] is used to check whether a [link_constexpr_constructible] type is a [link_callable] type that yields a `constexpr` result -- no arguments necessary.
-[*7.] [link_bind] is used to intercept the signature information from a `std::placeholder` expression before forwarding on to `std::bind` or `boost::bind`. This gives library writers the power to create more flexible template APIs for callable types.
+[*7] (TODO - fill this in)
[*8.] [link_min_arity] can be used to detect the presence of default arguments on a [link_simple_fn_obj]
@@ -678,11 +665,6 @@ In order to avoid significant standardese in the reference sections, we need to
[endsect]
-[section:ref_bind_expression [concept_bind_expression]]
-* The return type of a call to [namespace_scoped]`bind`
-
-[endsect]
-
[section:ref_constexpr_constructible [concept_constexpr_constructible]]
* Any [@http://en.cppreference.com/w/cpp/concept/LiteralType LiteralType] that is also default-constructible
@@ -783,7 +765,6 @@ The [libname] interface is also broken down by trait into individual header file
* [include_header [link_is_invokable]]
* [include_header [link_is_invokable_constexpr]]
* [include_header [link_function_type]]
-* [include_header [link_bind]]
[endsect]
@@ -1169,16 +1150,12 @@ For `add_calling_convention` to work as-intended, you must:
* `T` must be one of the following:
* [link_signature]
* [link_simple_fn_obj]
- * [link_bind_expression]
* When `T` is a [link_signature], then:
* Let `ArgCount` represent the number of arguments in the signature of `T`
* `Index` must be less than `ArgCount` and greater than zero
* Otherwise, when `T` is a [link_simple_fn_obj], then:
* Let `ArgCount` represent the number of arguments in `decltype(&std::decay_t
- At a glance, there appear to be around 260 search
- results on Stack Overflow concerning the conversion from
-
- Due to limitations in the Microsoft compiler, this example will not compile
- with MSVC. For more information, refer to the Compatibility
- Issues section.
- bind
- trips a static_assert on the following platforms:
-
-
min_arity
and max_arity
diff --git a/doc/html/callable_traits/example_std_function_sugar.html b/doc/html/callable_traits/example_std_function_sugar.html
deleted file mode 100644
index f672666..0000000
--- a/doc/html/callable_traits/example_std_function_sugar.html
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
-
-
-
Home
-Libraries
-People
-FAQ
-More
-
-
-
-
- Explanation
-
-std::bind
- results to std::function, and around 340 search
- results concerning the conversion of lambdas to std::function.
- There are few good reasons for converting std::bind result
- objects into std::function objects, and fewer still for creating
- std::function objects without explicitly specifying
- the function type. Regardless, here's a make_function
- function, which can...
-
-
std::function<T>
- where T is not explicitly supplied by the user
- std::function<T>
- where T is the implied "signature" of an std::placeholders
- expression
- make_function is rather silly,
- especially since we have no contextual reason for incurring the costs of type
- erasure. Still, it's a lightweight example of the kind of metaprogramming you
- can do with CallableTraits.
-
-
- Usage
-
-
-
-
-
-![[Note]](../../src/images/note.png)
Note
-
-#include <cassert>
-
-#include "make_function.hpp"
-
-using namespace example;
-using namespace std::placeholders;
-
-int add(int i, int j) {
- return i + j;
-}
-
-struct adder {
-
- int eval(int i, int j) const {
- return i + j;
- }
-};
-
-int main() {
-
- // function pointer
- auto f = make_function(&add);
- assert(f(99, 1) == 100);
-
- // function reference
- f = make_function(add);
- assert(f(99, 1) == 100);
-
- // member function pointer (bound to object)
- f = make_function(&adder::eval, adder{}, _1, _2);
- assert(f(99, 1) == 100);
-
- // lambda
- f = make_function([](int i, int j) {
- return i + j;
- });
-
- assert(f(99, 1) == 100);
-}
-
-
-
- Implementation
-
-#ifndef EXAMPLE_MAKE_FUNCTION_HPP
-#define EXAMPLE_MAKE_FUNCTION_HPP
-
-#include <functional>
-#include <callable_traits/function_type.hpp>
-#include <callable_traits/bind.hpp>
-
-namespace example {
-
- namespace ct = callable_traits;
-
- // make_function turns a non-overloaded callable into a type-erased std::function object
- template<typename T>
- inline decltype(auto) make_function(T&& t) {
-
- // callable_traits::function_type decays any non-overloaded callable type to
- // a plain function type, which is structured in terms of INVOKE.
-
- using no_ref = typename std::remove_reference<T>::type;
- using f = ct::function_type<no_ref>;
- using result_type = std::function<f>;
- return result_type{ std::forward<T>(t) };
- }
-
- // this make_function overload turns a bind expression into a type-erased std::function object
- template<typename T, typename First, typename... Others>
- inline decltype(auto) make_function(T&& t, First&& first, Others&&... others) {
-
- // callable_traits::bind is essentially a compile-time parser of placeholder
- // expressions, for the purpose of retaining more type information than
- // std::bind normally allows - specifically, callable_traits::bind is used to
- // determine the de-facto signature of the std::bind return type, with special
- // considerations for conversions between reused placeholders and nested
- // placeholder expressions. For the sake of convenience, callable_traits::bind
- // is also a thin forwarding wrapper around std::bind (which is the only true
- // runtime element in CallableTraits).
-
- using bind_expr = decltype(ct::bind(
- std::forward<T>(t),
- std::forward<First>(first),
- std::forward<Others>(others)...
- ));
-
- using f = ct::function_type<bind_expr>;
- using result_type = std::function<f>;
-
- return result_type{ std::bind(
- std::forward<T>(t),
- std::forward<First>(first),
- std::forward<Others>(others)...
- )};
- }
-}
-
-#endif //#ifndef EXAMPLE_MAKE_FUNCTION_HPP
-
-
-
-
-
-
-
-
-
diff --git a/doc/html/callable_traits/faq.html b/doc/html/callable_traits/faq.html
index c01a56d..0a8e238 100644
--- a/doc/html/callable_traits/faq.html
+++ b/doc/html/callable_traits/faq.html
@@ -164,11 +164,7 @@
result -- no arguments necessary.
- 7. bind
- is used to intercept the signature information from a std::placeholder
- expression before forwarding on to std::bind
- or boost::bind. This gives library writers the power
- to create more flexible template APIs for callable types.
+ 7 (TODO - fill this in)
8. min_arity
@@ -257,9 +253,7 @@
a type or a value argument. Even if variable template
support were commonplace among production compilers, function templates would
still have the upper hand in this regard. The same argument applies to alias
- templates and class templates. Since CallableTraits supports
- all value categories and qualifiers, using these function templates really
- couldn't be any easier.
+ templates and class templates.
callable_traits::bind
- #include<callable_traits/function_type.hpp>
#include<callable_traits/bind.hpp>
- T is a
- BindExpression,
- then:
- MaxPlaceholder
- represent the type of the largest std::placeholders
- object in the bind expression tree
- Index must be less
- than std::is_placeholder<MaxPlaceholder>::value and greater than zero
- T must be one of the following:
* Signature
* SimpleFunctionObject
- * BindExpression
T is a
- BindExpression,
- then:
- bind_args...
- represent the argument values that were passed to [namespace]bind which returned an instance
- of T
- bind_result represent
- the return value of std::bind(bind_args...)
- Args...
- represent the "valid argument types" to bind_result's
- operator()
- std::placeholders
- objects
- args<T>
- aliases std::tuple<Args...>
-