diff --git a/doc/callable_traits.qbk b/doc/callable_traits.qbk index 147997d..994f7f5 100644 --- a/doc/callable_traits.qbk +++ b/doc/callable_traits.qbk @@ -1419,9 +1419,9 @@ For `add_calling_convention` to work as-intended, you must: namespace ``[lib_namespace]`` { - template class Container> - using expand_args = /* implementation-defined */; - } + template class Container> + using expand_args = /* implementation-defined */; + } [heading Constraints] # `T` must be one of the following: @@ -1715,14 +1715,40 @@ TODO [endsect] [section:ref_push_back push_back] -TODO + + namespace ``[lib_namespace]`` { + + template + using push_back = /* implementation-defined */; + } + +[heading Constraints] +* `T` must be a [link_signature] + +[heading Behavior] +* `push_back` aliases a type identical to `T`, except that `NewArgs...` have been appended to the back of `T`'s parameter list [Args]. +* [VarArgs] remain if present in `T`. + [heading Example] [import ../example/push_back.cpp] [push_back] [endsect] [section:ref_push_front push_front] -TODO + + namespace ``[lib_namespace]`` { + + template + using push_front = /* implementation-defined */; + } + +[heading Constraints] +* `T` must be a [link_signature] + +[heading Behavior] +* `push_back` aliases a type identical to `T`, except that `NewArgs...` have been appended to the front of `T`'s parameter list [Args]. +* [VarArgs] remain if present in `T`. + [heading Example] [import ../example/push_front.cpp] [push_front] @@ -1731,14 +1757,14 @@ TODO [section:ref_pop_back pop_back] TODO [heading Example] -[/import ../example/pop_back.cpp] +[import ../example/pop_back.cpp] [pop_back] [endsect] [section:ref_push_front pop_front] TODO [heading Example] -[/import ../example/pop_front.cpp] +[import ../example/pop_front.cpp] [pop_front] [endsect] diff --git a/doc/html/callable_traits/ref_expand_args.html b/doc/html/callable_traits/ref_expand_args.html index 19b1c7b..9df3f07 100644 --- a/doc/html/callable_traits/ref_expand_args.html +++ b/doc/html/callable_traits/ref_expand_args.html @@ -28,9 +28,9 @@
namespace callable_traits {
 
-        template<typename T, template<class...> class Container>
-        using expand_args = /* implementation-defined */;
-    }
+    template<typename T, template<class...> class Container>
+    using expand_args = /* implementation-defined */;
+}
 

diff --git a/doc/html/callable_traits/ref_pop_back.html b/doc/html/callable_traits/ref_pop_back.html index b8c092e..6393ef1 100644 --- a/doc/html/callable_traits/ref_pop_back.html +++ b/doc/html/callable_traits/ref_pop_back.html @@ -33,9 +33,18 @@ Example

-

- [pop_back] -

+
#include <callable_traits/pop_back.hpp>
+
+namespace ct = callable_traits;
+
+int main() {
+
+    using f = void(*)(int, char);
+    using test = ct::pop_back<f>;
+    using expect = void(*)(int);
+    static_assert(std::is_same<test, expect>::value, "");
+}
+
diff --git a/doc/html/callable_traits/ref_push_back.html b/doc/html/callable_traits/ref_push_back.html index 3e15507..1b57a24 100644 --- a/doc/html/callable_traits/ref_push_back.html +++ b/doc/html/callable_traits/ref_push_back.html @@ -26,11 +26,34 @@ -

- TODO -

+
namespace callable_traits {
+
+    template<typename T, typename... NewArgs>
+    using push_back = /* implementation-defined */;
+}
+

+ Constraints +

+
+

+ + Behavior +

+
    +
  • + push_back<T, NewArgs...> aliases a type identical to T, except that NewArgs... have been appended to the back of T's parameter list [Args...]. +
  • +
  • + [VarArgs] remain if present in + T. +
  • +
+

+ Example

#include <callable_traits/push_back.hpp>
diff --git a/doc/html/callable_traits/ref_push_front.html b/doc/html/callable_traits/ref_push_front.html
index 15f5559..a4e842b 100644
--- a/doc/html/callable_traits/ref_push_front.html
+++ b/doc/html/callable_traits/ref_push_front.html
@@ -26,11 +26,35 @@
 
-

- TODO -

+
namespace callable_traits {
+
+    template<typename T, typename... NewArgs>
+    using push_front = /* implementation-defined */;
+}
+

+ Constraints +

+
+

+ + Behavior +

+
    +
  • + push_back<T, NewArgs...> aliases a type identical to T, except that NewArgs... have been appended to the front of + T's parameter list [Args...]. +
  • +
  • + [VarArgs] remain if present in + T. +
  • +
+

+ Example

#include <callable_traits/push_front.hpp>
diff --git a/doc/html/callable_traits/ref_push_front0.html b/doc/html/callable_traits/ref_push_front0.html
index fb12a33..ee2b11e 100644
--- a/doc/html/callable_traits/ref_push_front0.html
+++ b/doc/html/callable_traits/ref_push_front0.html
@@ -33,9 +33,20 @@
 
       Example
     
-

- [pop_front] -

+
#include <callable_traits/pop_front.hpp>
+
+namespace ct = callable_traits;
+
+struct foo;
+
+int main() {
+
+    using f = void(foo::* const &)(int, char, long);
+    using test = ct::pop_front<f>;
+    using expect = void(foo::* const &)(char, long);
+    static_assert(std::is_same<test, expect>::value, "");
+}
+
diff --git a/example/pop_back.cpp b/example/pop_back.cpp new file mode 100644 index 0000000..06a324d --- /dev/null +++ b/example/pop_back.cpp @@ -0,0 +1,19 @@ +/*<- +Copyright Barrett Adair 2016 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt) +->*/ + +//[ pop_back +#include + +namespace ct = callable_traits; + +int main() { + + using f = void(*)(int, char); + using test = ct::pop_back; + using expect = void(*)(int); + static_assert(std::is_same::value, ""); +} +//] diff --git a/example/pop_front.cpp b/example/pop_front.cpp new file mode 100644 index 0000000..396dd9c --- /dev/null +++ b/example/pop_front.cpp @@ -0,0 +1,21 @@ +/*<- +Copyright Barrett Adair 2016 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt) +->*/ + +//[ pop_front +#include + +namespace ct = callable_traits; + +struct foo; + +int main() { + + using f = void(foo::* const &)(int, char, long); + using test = ct::pop_front; + using expect = void(foo::* const &)(char, long); + static_assert(std::is_same::value, ""); +} +//]