[algs] Declare coerce() as constexpr
This commit is contained in:
parent
2fdb7616f5
commit
b4d1ec310c
|
@ -229,11 +229,11 @@ HB_FUNCOBJ (hb_bool);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static inline
|
static inline
|
||||||
T hb_coerce (const T v) { return v; }
|
constexpr T hb_coerce (const T v) { return v; }
|
||||||
template <typename T, typename V,
|
template <typename T, typename V,
|
||||||
hb_enable_if (!hb_is_same (hb_decay<T>, hb_decay<V>) && std::is_pointer<V>::value)>
|
hb_enable_if (!hb_is_same (hb_decay<T>, hb_decay<V>) && std::is_pointer<V>::value)>
|
||||||
static inline
|
static inline
|
||||||
T hb_coerce (const V v) { return *v; }
|
constexpr T hb_coerce (const V v) { return *v; }
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue