提交 56d2d029 编写于 作者: B Behdad Esfahbod

[algs] Sprinkle hb_min/max with hb-forward salad

Let's see if fixes MSVC fail.  Though, the error doesn't make sense to me.

  hb-blob.cc
c:\projects\harfbuzz\src\hb-algs.hh(166): error C2440: 'return': cannot convert from 'unsigned int' to 'unsigned int &&' [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
  c:\projects\harfbuzz\src\hb-algs.hh(166): note: You cannot bind an lvalue to an rvalue reference
  c:\projects\harfbuzz\src\hb-algs.hh(174): note: see reference to function template instantiation 'T &&<unnamed-type-hb_min>::impl<T,unsigned int&>(T &&,T2) const' being compiled
          with
          [
              T=unsigned int,
              T2=unsigned int &
          ]
上级 bdbfdc92
......@@ -163,11 +163,12 @@ struct
{
private:
template <typename T, typename T2> auto
impl (T&& a, T2&& b) const HB_AUTO_RETURN (a <= b ? a : b)
impl (T&& a, T2&& b) const HB_AUTO_RETURN
(hb_forward<T> (a) <= hb_forward<T2> (b) ? hb_forward<T> (a) : hb_forward<T2> (b))
public:
template <typename T> auto
operator () (T&& a) const HB_AUTO_RETURN (a)
operator () (T&& a) const HB_AUTO_RETURN (hb_forward<T> (a))
template <typename T, typename... Ts> auto
operator () (T&& a, Ts&& ...ds) const HB_AUTO_RETURN
......@@ -178,11 +179,12 @@ struct
{
private:
template <typename T, typename T2> auto
impl (T&& a, T2&& b) const HB_AUTO_RETURN (a >= b ? a : b)
impl (T&& a, T2&& b) const HB_AUTO_RETURN
(hb_forward<T> (a) >= hb_forward<T2> (b) ? hb_forward<T> (a) : hb_forward<T2> (b))
public:
template <typename T> auto
operator () (T&& a) const HB_AUTO_RETURN (a)
operator () (T&& a) const HB_AUTO_RETURN (hb_forward<T> (a))
template <typename T, typename... Ts> auto
operator () (T&& a, Ts&& ...ds) const HB_AUTO_RETURN
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册