[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 & ]
This commit is contained in:
parent
bdbfdc92b5
commit
56d2d0294b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue