From 3cce995877efd6ad9cd44975201b34b333b7720a Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 31 May 2017 23:18:08 +0300 Subject: [PATCH] Rename mp_for_index_c to mp_for_index --- doc/html/mp11.html | 14 ++++---------- doc/mp11/algorithm.qbk | 8 +++----- include/boost/mp11/detail/mp_for_index.hpp | 4 ++-- test/mp_for_index.cpp | 3 +-- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/doc/html/mp11.html b/doc/html/mp11.html index 90c528f..0e58619 100644 --- a/doc/html/mp11.html +++ b/doc/html/mp11.html @@ -148,7 +148,6 @@
mp_none_of<L, P>
mp_any_of<L, P>
mp_for_each<L>(f)
-
mp_for_index_c<N>(i, f)
mp_for_index<N>(i, f)
Set Operations, <boost/mp11/set.hpp>
@@ -2040,25 +2039,20 @@
template<std::size_t N, class F> decltype(std::declval<F>()(std::declval<mp_size_t<0>>())) mp_for_index( std::size_t i, F && f );
 

- mp_for_index_c<N>(i, f) calls f + mp_for_index<N>(i, f) calls f with mp_size_t<i>() and returns the result. i must be less than N.

-
-
-
template<class N, class F> decltype(std::declval<F>()(std::declval<mp_size_t<0>>())) mp_for_index( std::size_t i, F && f );
 

- Returns mp_for_index_c<N::value>(i, f). + Returns mp_for_index<N::value>(i, f).

@@ -2529,7 +2523,7 @@ - +

Last revised: May 31, 2017 at 16:52:56 GMT

Last revised: May 31, 2017 at 20:15:36 GMT


diff --git a/doc/mp11/algorithm.qbk b/doc/mp11/algorithm.qbk index 8fa6d63..a4251bb 100644 --- a/doc/mp11/algorithm.qbk +++ b/doc/mp11/algorithm.qbk @@ -289,16 +289,14 @@ is `mp_size`. Returns `std::forward(f)`. [endsect] -[section `mp_for_index_c(i, f)`] +[section `mp_for_index(i, f)`] template decltype(std::declval()(std::declval>())) mp_for_index( std::size_t i, F && f ); -`mp_for_index_c(i, f)` calls `f` with `mp_size_t()` and returns the result. `i` must be less than `N`. -[endsect] +`mp_for_index(i, f)` calls `f` with `mp_size_t()` and returns the result. `i` must be less than `N`. -[section `mp_for_index(i, f)`] template decltype(std::declval()(std::declval>())) mp_for_index( std::size_t i, F && f ); -Returns `mp_for_index_c(i, f)`. +Returns `mp_for_index(i, f)`. [endsect] [endsect:algorithm] diff --git a/include/boost/mp11/detail/mp_for_index.hpp b/include/boost/mp11/detail/mp_for_index.hpp index ae4ea42..85f3c45 100644 --- a/include/boost/mp11/detail/mp_for_index.hpp +++ b/include/boost/mp11/detail/mp_for_index.hpp @@ -348,7 +348,7 @@ template<> struct mp_for_index_impl_<16> } // namespace detail -template inline decltype(std::declval()(std::declval>())) mp_for_index_c( std::size_t i, F && f ) +template inline decltype(std::declval()(std::declval>())) mp_for_index( std::size_t i, F && f ) { assert( i < N ); return detail::mp_for_index_impl_::template call<0>( i, std::forward(f) ); @@ -356,7 +356,7 @@ template inline decltype(std::declval()(std::declval< template inline decltype(std::declval()(std::declval>())) mp_for_index( std::size_t i, F && f ) { - return mp_for_index_c( i, std::forward(f) ); + return mp_for_index( i, std::forward(f) ); } } // namespace mp11 diff --git a/test/mp_for_index.cpp b/test/mp_for_index.cpp index c8c7dfb..d00e77c 100644 --- a/test/mp_for_index.cpp +++ b/test/mp_for_index.cpp @@ -16,7 +16,6 @@ using boost::mp11::mp_size_t; using boost::mp11::mp_for_each; using boost::mp11::mp_for_index; -using boost::mp11::mp_for_index_c; using boost::mp11::mp_iota_c; struct F @@ -42,7 +41,7 @@ struct G { for( std::size_t i = 0; i < N; ++i ) { - mp_for_index_c( i, F(i) ); + mp_for_index( i, F(i) ); mp_for_index>( i, F(i) ); } }