forked from boostorg/mp11
Document mp_back, mp_pop_back
This commit is contained in:
1 parent
dda257c403
commit
ed431d7624
3 files changed
+15
-2
No files matched your search
+13
-1
@@ -1,5 +1,5 @@
|
||||
////
|
||||
Copyright 2017 Peter Dimov
|
||||
Copyright 2017-2019 Peter Dimov
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
|
||||
@@ -367,6 +367,18 @@ Same as `mp_at_c`, but with a type argument `I`. `I::value` must be a nonnegativ
|
||||
|
||||
Same as `mp_take_c`, but with a type argument `N`. `N::value` must be a nonnegative number.
|
||||
|
||||
## mp_back<L>
|
||||
|
||||
template<class L> using mp_back = mp_at_c<L, mp_size<L>::value - 1>;
|
||||
|
||||
`mp_back<L>` returns the last element of the list `L`.
|
||||
|
||||
## mp_pop_back<L>
|
||||
|
||||
template<class L> using mp_pop_back = mp_take_c<L, mp_size<L>::value - 1>;
|
||||
|
||||
`mp_pop_back<L>` removes the last element of the list `L` and returns the result.
|
||||
|
||||
## mp_insert_c<L, I, T...>
|
||||
|
||||
template<class L, std::size_t I, class... T> using mp_insert_c =
|
||||
|
||||
Reference in new issue
Block a user