diff --git a/doc/mp11/algorithm.adoc b/doc/mp11/algorithm.adoc index bfd0d70..fa6b594 100644 --- a/doc/mp11/algorithm.adoc +++ b/doc/mp11/algorithm.adoc @@ -319,35 +319,46 @@ As `mp_product`, but takes a quoted metafunction. Same as `mp_drop_c`, but with a type argument `N`. `N::value` must be a nonnegative number. -## mp_from_sequence +## mp_from_sequence - template using mp_from_sequence = /*...*/ + template> using mp_from_sequence = /*...*/ `mp_from_sequence` transforms an integer sequence produced by `make_integer_sequence` into an `mp_list` -of the corresponding `std::integral_constant` types. Given +of the corresponding `std::integral_constant` types. If the optional second parameter `F` is supplied, +an offset of `F::value` is added to all values. + +Given template struct S; -`mp_from_sequence>` is an alias for `mp_list...>`. +`mp_from_sequence, F>` is an alias for `mp_list...>`. -## mp_iota_c +## mp_iota_c - template using mp_iota_c = /*...*/; + template using mp_iota_c = /*...*/; -`mp_iota_c` is an alias for `mp_list, mp_size_t<1>, ..., mp_size_t>`. +`mp_iota_c` is an alias for `mp_list, mp_size_t, ..., mp_size_t>`. -## mp_iota +.mp_iota_c +[cols="<.^4m,4*^.^1m",width=85%] +|=== +|*mp_iota_c<4>*|mp_size_t<0>|mp_size_t<1>|mp_size_t<2>|mp_size_t<3> +|*mp_iota_c<4, 2>*|mp_size_t<2>|mp_size_t<3>|mp_size_t<4>|mp_size_t<5> +|=== - template using mp_iota = /*...*/; +## mp_iota -Same as `mp_iota_c`, but with a type argument `N`. `N::value` must be a nonnegative number. Returns -`mp_list, std::integral_constant, ..., std::integral_constant>` + template> using mp_iota = /*...*/; + +Same as `mp_iota_c`, but with a type arguments `N` and `F`. `N::value` must be a nonnegative number. Returns +`mp_list, std::integral_constant, ..., std::integral_constant>` where `T` is the type of `N::value`. .mp_iota [cols="<.^4m,4*^.^1m",width=85%] |=== -|*mp_iota>*|mp_int<0>|mp_int<1>|mp_int<2>|mp_int<3> +|*mp_iota>*|mp_size_t<0>|mp_size_t<1>|mp_size_t<2>|mp_size_t<3> +|*mp_iota, mp_int\<-2>>*|mp_int\<-2>|mp_int\<-1>|mp_int<0>|mp_int<+1> |=== ## mp_at_c