提交 ceda1f03 编写于 作者: B Behdad Esfahbod

Fix compile

NameRecord is not copy-constructible, so should be iterator of
const-reference.
上级 3686c3b6
...@@ -157,8 +157,6 @@ struct hb_is_convertible ...@@ -157,8 +157,6 @@ struct hb_is_convertible
(!either_void && (!either_void &&
decltype (impl<hb_conditional<from_void, int, From>> (hb_prioritize))::value); decltype (impl<hb_conditional<from_void, int, From>> (hb_prioritize))::value);
}; };
#define hb_is_convertible(From,To) hb_is_convertible<From, To>::value #define hb_is_convertible(From,To) hb_is_convertible<From, To>::value
......
...@@ -170,7 +170,7 @@ struct name ...@@ -170,7 +170,7 @@ struct name
{ return min_size + count * nameRecordZ.item_size; } { return min_size + count * nameRecordZ.item_size; }
template <typename Iterator, template <typename Iterator,
hb_requires (hb_is_iterator_of (Iterator, const NameRecord))> hb_requires (hb_is_iterator_of (Iterator, const NameRecord &))>
bool serialize (hb_serialize_context_t *c, bool serialize (hb_serialize_context_t *c,
Iterator it, Iterator it,
const void *src_string_pool) const void *src_string_pool)
......
...@@ -55,6 +55,18 @@ main (int argc, char **argv) ...@@ -55,6 +55,18 @@ main (int argc, char **argv)
static_assert (hb_is_convertible (int&, const int)); static_assert (hb_is_convertible (int&, const int));
static_assert (hb_is_convertible (const int&, int)); static_assert (hb_is_convertible (const int&, int));
static_assert (hb_is_convertible (const int&, const int)); static_assert (hb_is_convertible (const int&, const int));
static_assert (hb_is_convertible (const int&, const int));
struct X {};
static_assert (hb_is_convertible (const X &, const X));
static_assert (hb_is_convertible (X &, const X));
static_assert (hb_is_convertible (X &, const X &));
static_assert (hb_is_convertible (X, const X &));
static_assert (hb_is_convertible (const X, const X &));
static_assert (!hb_is_convertible (const X, X &));
static_assert (!hb_is_convertible (X, X &));
static_assert (hb_is_convertible (X &, X &));
static_assert (hb_is_convertible (int&, long)); static_assert (hb_is_convertible (int&, long));
static_assert (!hb_is_convertible (int&, long&)); static_assert (!hb_is_convertible (int&, long&));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册