diff --git a/doc/callable_traits.qbk b/doc/callable_traits.qbk
index d448759..b904bbd 100644
--- a/doc/callable_traits.qbk
+++ b/doc/callable_traits.qbk
@@ -357,60 +357,9 @@ To include the experimental examples for calling conventions in the build, appen
[import ../include/callable_traits/apply_return.hpp]
[apply_return_hpp]
-[section:ref_apply_return apply_return]
+[import ../include/callable_traits/arg_at.hpp]
+[arg_at_hpp]
-[heading Constraints]
-
-`T` must be a [link_signature] or a [link_pmd].
-
-[heading Behavior]
-* `apply_return
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- (substitution failure)
-
+ (substitution failure)
+
-
+
- (substitution failure)
-
+ (substitution failure)
+
-
+
- (substitution failure)
-
+ (substitution failure)
+
-
+
- (substitution failure)
-
+ (substitution failure)
+
-
+
- (substitution failure)
-
+ (substitution failure)
+
- (substitution failure)
+
-
- (substitution failure)
+
+
+
+
+ Header
+
+#include<callable_traits/add_member_const.hpp>
+
+
+ Definition
+
namespace callable_traits {
template<typename T>
- struct add_member_const {
-
- using type = //implementation-defined
- };
+ using add_member_const_t = //implementation-defined
template<typename T>
- using add_member_const_t = typename add_member_const<T>::type;
+ struct add_member_const {
+ using type = add_member_const_t<T>;
+ };
}
-
+
Constraints
T must be a function or
- a member function pointer
+ T must be a function type
+ or a member function pointer type
-
+
Behavior
+
const qualifier
to T, if not already present
-
- Input/Output
- Examples
-
+
+ Input/Output
+ Examples
+
-
+ T
- T
+
-
+ add_member_const_t<T>
- add_member_const_t<T>
+
-
+ int()
- int()
+
-
+ int()
- const
- int()
+ const
+
-
+ int(foo::*)()
- int(foo::*)()
+
-
+ int(foo::*)()
- const
- int(foo::*)()
+ const
+
-
+ int(foo::*)()
- &
- int(foo::*)()
+ &
+
-
+ int(foo::*)()
- const &
- int(foo::*)()
+ const &
+
-
+ int(foo::*)()
- &&
- int(foo::*)()
+ &&
+
-
+ int(foo::*)()
- const &&
- int(foo::*)()
+ const &&
+
-
+ int(foo::*)()
- const
- int(foo::*)()
+ const
+
-
+ int(foo::*)()
- const
- int(foo::*)()
+ const
+
-
+ int(foo::*)()
- volatile
- int(foo::*)()
+ volatile
+
-
+ int(foo::*)()
- const volatile
- int(foo::*)()
+ const volatile
+
-
+ int(foo::*)()
- transaction_safe
- int(foo::*)()
+ transaction_safe
+
-
+ int(foo::*)()
- const transaction_safe
- int(foo::*)()
+ const transaction_safe
+
-
+ int
- int
+
-
+
-
+ int (&)()
- int (&)()
+
-
+
-
+ int (*)()
- int (*)()
+
-
+
-
+ int foo::*
- int foo::*
+
-
+
-
+ int (foo::*
- const)()
- int (foo::*
+ const)()
+
-
+
-
+
Example
Program
@@ -279,10 +288,6 @@
using test = ct::add_member_const_t<f>;
static_assert(std::is_same<test, expect>::value, "");
}
-
- // A substitution failure will occur if add_member_const_t is used
- // with function pointers, function references, function objects,
- // or member data pointers.
}
diff --git a/doc/html/callable_traits/ref_add_member_cv.html b/doc/html/callable_traits/ref_add_member_cv.html
index 91fb96e..c79c7aa 100644
--- a/doc/html/callable_traits/ref_add_member_cv.html
+++ b/doc/html/callable_traits/ref_add_member_cv.html
@@ -26,36 +26,49 @@
+
+
+ Header
+
+#include<callable_traits/add_member_cv.hpp>
+
+
+ Definition
+
namespace callable_traits {
template<typename T>
- struct add_member_cv {
-
- using type = //implementation-defined
- };
+ using add_member_cv_t = //implementation-defined
template<typename T>
- using add_member_cv_t = typename add_member_cv<T>::type;
+ struct add_member_cv {
+ using type = add_member_cv_t<T>;
+ };
}
-
+
Constraints
T must be a function or
- a member function pointer
+ T must be a function type
+ or a member function pointer type
-
+
Behavior
-
+
const and volatile qualifiers to T,
if not already present
-
-
+
Input/Output
Examples
@@ -240,7 +253,7 @@
-
+
Example
Program
@@ -278,11 +291,6 @@
using test = ct::add_member_cv_t<f>;
static_assert(std::is_same<test, expect>::value, "");
}
-
-// A substitution failure will occur if add_member_cv_t is used
-// with function pointers, function references, function objects,
-// or member data pointers.
-
}
diff --git a/doc/html/callable_traits/ref_add_member_lvalue_reference.html b/doc/html/callable_traits/ref_add_member_lvalue_reference.html
index 475be69..1a29988 100644
--- a/doc/html/callable_traits/ref_add_member_lvalue_reference.html
+++ b/doc/html/callable_traits/ref_add_member_lvalue_reference.html
@@ -26,32 +26,42 @@
+
+
+ Header
+
+#include<callable_traits/add_member_lvalue_reference.hpp>
+
+
+ Definition
+
namespace callable_traits {
template<typename T>
- struct add_member_lvalue_reference {
-
- using type = //implementation-defined
- };
+ using add_member_lvalue_reference_t = //implementation-defined
template<typename T>
- using add_member_lvalue_reference_t =
- typename add_member_lvalue_reference<T>::type;
+ struct add_member_lvalue_reference {
+ using type = add_member_lvalue_reference_t<T>;
+ };
}
-
+
Constraints
T must be a function or
- a member function pointer
+ T must be a function type
+ or a member function pointer type
-
+
Behavior
+
&)
to T, if not already present
@@ -62,7 +72,7 @@
-
+
Input/Output
Examples
@@ -230,7 +240,7 @@
-
+
Example
Program
@@ -271,10 +281,6 @@
using test = ct::add_member_lvalue_reference_t<f>;
static_assert(std::is_same<test, expect>::value, "");
}
-
- // A substitution failure will occur if add_member_lvalue_reference_t
- // is used with function pointers, function references, function objects,
- // or member data pointers.
}
diff --git a/doc/html/callable_traits/ref_add_member_rvalue_reference.html b/doc/html/callable_traits/ref_add_member_rvalue_reference.html
index 21d9711..108de50 100644
--- a/doc/html/callable_traits/ref_add_member_rvalue_reference.html
+++ b/doc/html/callable_traits/ref_add_member_rvalue_reference.html
@@ -26,32 +26,42 @@
+
+
+ Header
+
+#include<callable_traits/add_member_rvalue_reference.hpp>
+
+
+ Definition
+
namespace callable_traits {
template<typename T>
- struct add_member_rvalue_reference {
-
- using type = //implementation-defined
- };
+ using add_member_rvalue_reference_t = //implementation-defined
template<typename T>
- using add_member_rvalue_reference_t =
- typename add_member_rvalue_reference<T>::type;
+ struct add_member_rvalue_reference {
+ using type = add_member_rvalue_reference_t<T>;
+ };
}
-
+
Constraints
T must be a function or
- a member function pointer
+ T must be a function type
+ or a member function pointer type
-
+
Behavior
+
&&)
to T, if not already present
@@ -62,7 +72,7 @@
-
+
Input/Output
Examples
@@ -230,7 +240,7 @@
-
+
Example
Program
@@ -271,10 +281,6 @@
using test = ct::add_member_rvalue_reference_t<f>;
static_assert(std::is_same<test, expect>::value, "");
}
-
- // A substitution failure will occur if add_member_rvalue_reference_t
- // is used with function pointers, function references, function objects,
- // or member data pointers.
}
diff --git a/doc/html/callable_traits/ref_add_member_volatile.html b/doc/html/callable_traits/ref_add_member_volatile.html
index baff461..b946744 100644
--- a/doc/html/callable_traits/ref_add_member_volatile.html
+++ b/doc/html/callable_traits/ref_add_member_volatile.html
@@ -26,36 +26,49 @@
+
+
+ Header
+
+#include<callable_traits/add_member_volatile.hpp>
+
+
+ Definition
+
namespace callable_traits {
template<typename T>
- struct add_member_volatile {
-
- using type = //implementation-defined
- };
+ using add_member_volatile_t = //implementation-defined
template<typename T>
- using add_member_volatile_t = typename add_member_volatile<T>::type;
+ struct add_member_volatile {
+ using type = add_member_volatile_t<T>;
+ };
}
-
+
Constraints
T must be a function or
- a member function pointer
+ T must be a function type
+ or a member function pointer type
-
+
Behavior
-
+
T,
if not already present
-
-
+
Input/Output
Examples
@@ -223,7 +236,7 @@
-
+
Example Program
#include <type_traits>
@@ -260,10 +273,6 @@
using test = ct::add_member_volatile_t<f>;
static_assert(std::is_same<test, expect>::value, "");
}
-
- // A substitution failure will occur if add_member_volatile_t
- // is used with function pointers, function references,
- // function objects, or member data pointers.
}
diff --git a/doc/html/callable_traits/ref_add_transaction_safe.html b/doc/html/callable_traits/ref_add_transaction_safe.html
index 3336c96..01817db 100644
--- a/doc/html/callable_traits/ref_add_transaction_safe.html
+++ b/doc/html/callable_traits/ref_add_transaction_safe.html
@@ -26,51 +26,65 @@
+
+
+ Header
+
+#include<callable_traits/add_transaction_safe.hpp>
+
+
+ Definition
+
namespace callable_traits {
template<typename T>
- struct add_transaction_safe {
-
- using type = //implementation-defined
- };
+ using add_transaction_safe_t = //implementation-defined
template<typename T>
- using add_transaction_safe_t =
- typename add_transaction_safe<T>::type;
+ struct add_transaction_safe {
+ using type = add_transaction_safe_t<T>;
+ };
+
+
}
-
+
Constraints
T must be one of the following:
-
+
Behavior
-
+
transaction_safe
specifier to T, if not
already present
-
-
+
Input/Output
Examples
@@ -239,7 +253,7 @@
-
+
Example
Program
diff --git a/doc/html/callable_traits/ref_add_varargs.html b/doc/html/callable_traits/ref_add_varargs.html
index a94a80d..7580ea1 100644
--- a/doc/html/callable_traits/ref_add_varargs.html
+++ b/doc/html/callable_traits/ref_add_varargs.html
@@ -26,70 +26,63 @@
+
+
+ Header
+
+#include<callable_traits/add_varargs.hpp>
+
+
+ Definition
+
namespace callable_traits {
template<typename T>
- struct add_varargs {
-
- using type = //implementation-defined
- };
+ using add_varargs_t = //implementation-defined
template<typename T>
- using add_varargs_t = typename add_varargs<T>::type;
+ struct add_varargs {
+ using type = add_varargs_t<T>;
+ };
}
-
+
Constraints
T must be one of the following:
-
+
Behavior
-
+
...)
to the signature of T,
if not already present
-
-
add_varargs<int()>
- aliases int(...)
- add_varargs<int(*)()>
- aliases int(*)(int, ...)
- add_varargs<int(&)()>
- aliases int(&)(int, ...)
- add_varargs<int(foo::*)()
- const>
- aliases int(foo::*)(...)
- const
-
-
+
Input/Output
Examples
@@ -278,7 +271,7 @@
-
+
Example
Program
@@ -317,21 +310,6 @@
using twice = ct::add_varargs_t<test>;
static_assert(std::is_same<test, twice>::value, "");
}
-
- // add_varargs_t fails in a SFINAE-friendly manner when
- // used on a function object or a member data pointer.
- //
- // {
- // using d = int foo::*;
- // using test = ct::add_varargs_t<d>;
- // }
- //
- // The error message is about as obvious as it can be without
- // resorting to a SFINAE-unfriendly static_assert (namespaces
- // omitted for brevity):
- //
- // error: no type named 'type' in 'struct disjunction<
- // type_value<invalid_type, false>, add_varargs_t_error<0> >'
}
diff --git a/doc/html/callable_traits/ref_apply_member_pointer.html b/doc/html/callable_traits/ref_apply_member_pointer.html
index a19b271..ed8fd2b 100644
--- a/doc/html/callable_traits/ref_apply_member_pointer.html
+++ b/doc/html/callable_traits/ref_apply_member_pointer.html
@@ -26,43 +26,34 @@
+
+
+ Header
+
+#include<callable_traits/apply_member_pointer.hpp>
+
+
+ Definition
+
namespace callable_traits {
template<typename T, typename C>
- struct apply_member_pointer {
-
- using type = //implementation-defined
- };
+ using apply_member_pointer_t = //implementation-defined
template<typename T, typename C>
- using apply_member_pointer_t =
- typename apply_member_pointer<T, C>::type;
+ struct apply_member_pointer {
+ using type = apply_member_pointer_t<T, C>;
+ };
}
-
+
Constraints
T must be one of the following:
-
-
T may be any type except
+ void
C must be a user-defined
@@ -70,10 +61,13 @@
-
+
Behavior
+
T is a function, function
pointer, or function reference, then the aliased type is a member function
@@ -86,9 +80,12 @@
C with the same parameters
and return type
std::remove_reference_t<T> C::*
+
-
+
Input/Output
Examples
@@ -234,19 +231,33 @@
int foo::*
+
bar
+ int &
+int foo::*
+
+
@@ -256,6 +267,18 @@
+
+const int
+ &
+
+
const int
+ foo::*
int (*const)()
+ int (*const foo::*)()
+
+ void
+
(substitution failure) @@ -265,7 +288,7 @@
#include<callable_traits/apply_return.hpp>+
namespace callable_traits { template<typename T, typename R> - struct apply_return { - - using type = //implementation-defined - }; + using apply_return_t = //implementation-defined template<typename T, typename R> - using apply_return_t = typename apply_return<T, R>::type; + struct apply_return { + using type = apply_return_t<T, R>; + }; }