Err, fix hb_invoke() variadic
This commit is contained in:
parent
c862a532df
commit
25dd88efc6
|
@ -73,7 +73,7 @@ struct
|
||||||
/* Pointer-to-member-function. */
|
/* Pointer-to-member-function. */
|
||||||
template <typename Appl, typename Val1, typename ...Vals> auto
|
template <typename Appl, typename Val1, typename ...Vals> auto
|
||||||
impl (Appl&& a, hb_priority<2>, Val1 &&v1, Vals &&...vs) const HB_AUTO_RETURN
|
impl (Appl&& a, hb_priority<2>, Val1 &&v1, Vals &&...vs) const HB_AUTO_RETURN
|
||||||
(hb_forward<Val1> (hb_deref_pointer (v1)).*a (hb_forward<Vals...> (vs...)))
|
(hb_forward<Val1> (hb_deref_pointer (v1)).*a (hb_forward<Vals> (vs)...))
|
||||||
|
|
||||||
/* Pointer-to-member. */
|
/* Pointer-to-member. */
|
||||||
template <typename Appl, typename Val> auto
|
template <typename Appl, typename Val> auto
|
||||||
|
@ -83,7 +83,7 @@ struct
|
||||||
/* Operator(). */
|
/* Operator(). */
|
||||||
template <typename Appl, typename ...Vals> auto
|
template <typename Appl, typename ...Vals> auto
|
||||||
impl (Appl&& a, hb_priority<0>, Vals &&...vs) const HB_AUTO_RETURN
|
impl (Appl&& a, hb_priority<0>, Vals &&...vs) const HB_AUTO_RETURN
|
||||||
(hb_deref_pointer (a) (hb_forward<Vals...> (vs...)))
|
(hb_deref_pointer (a) (hb_forward<Vals> (vs)...))
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ struct
|
||||||
(
|
(
|
||||||
impl (hb_forward<Appl> (a),
|
impl (hb_forward<Appl> (a),
|
||||||
hb_prioritize,
|
hb_prioritize,
|
||||||
hb_forward<Vals...> (vs...))
|
hb_forward<Vals> (vs)...)
|
||||||
)
|
)
|
||||||
} HB_FUNCOBJ (hb_invoke);
|
} HB_FUNCOBJ (hb_invoke);
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ main (int argc, char **argv)
|
||||||
;
|
;
|
||||||
/* The result should be something like 0->10, 1->11, ..., 9->19 */
|
/* The result should be something like 0->10, 1->11, ..., 9->19 */
|
||||||
assert (hb_map_get (result, 9) == 19);
|
assert (hb_map_get (result, 9) == 19);
|
||||||
|
|
||||||
unsigned int temp3 = 0;
|
unsigned int temp3 = 0;
|
||||||
+ hb_iter(src)
|
+ hb_iter(src)
|
||||||
| hb_map([&] (int i) -> int { return ++temp3; })
|
| hb_map([&] (int i) -> int { return ++temp3; })
|
||||||
|
@ -197,5 +197,8 @@ main (int argc, char **argv)
|
||||||
long vl;
|
long vl;
|
||||||
s >> vl;
|
s >> vl;
|
||||||
|
|
||||||
|
if (0)
|
||||||
|
hb_invoke (main, 0, nullptr);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue