Fix compile
NameRecord is not copy-constructible, so should be iterator of const-reference.
This commit is contained in:
parent
3686c3b65c
commit
ceda1f03b7
|
@ -157,8 +157,6 @@ struct hb_is_convertible
|
|||
(!either_void &&
|
||||
decltype (impl<hb_conditional<from_void, int, From>> (hb_prioritize))::value);
|
||||
};
|
||||
|
||||
|
||||
#define hb_is_convertible(From,To) hb_is_convertible<From, To>::value
|
||||
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ struct name
|
|||
{ return min_size + count * nameRecordZ.item_size; }
|
||||
|
||||
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,
|
||||
Iterator it,
|
||||
const void *src_string_pool)
|
||||
|
|
|
@ -55,6 +55,18 @@ main (int argc, char **argv)
|
|||
static_assert (hb_is_convertible (int&, const 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));
|
||||
|
||||
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&));
|
||||
|
|
Loading…
Reference in New Issue