mirror of
https://github.com/boostorg/mp11.git
synced 2025-08-05 07:24:26 +02:00
Document mp_back, mp_pop_back
This commit is contained in:
@@ -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 =
|
||||
|
@@ -19,6 +19,7 @@ http://www.boost.org/LICENSE_1_0.txt
|
||||
* Add `mp_transform_first`, `mp_transform_second`, `mp_transform_third`
|
||||
* Add `mp_filter`
|
||||
* Add `mp_eval_if_not`, `mp_eval_or`, `mp_valid_q`
|
||||
* Add `mp_back`, `mp_pop_back`
|
||||
|
||||
## Changes in 1.69.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#ifndef BOOST_MP11_ALGORITHM_HPP_INCLUDED
|
||||
#define BOOST_MP11_ALGORITHM_HPP_INCLUDED
|
||||
|
||||
// Copyright 2015-2017 Peter Dimov.
|
||||
// Copyright 2015-2019 Peter Dimov
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
//
|
||||
|
Reference in New Issue
Block a user