Skip to content

'hb-set.hh' build errors with MSVC #1374

@johne53

Description

@johne53

I'm seeing lots of errors when trying to build harfbuzz (from git master) with MSVC. They relate to some recent changes in 'src/hb-set.hh' (approx line 370) where 'sizeof (pages.arrayZ()[0])' got changed to 'sizeof (pages[0])'.

A similar error occurs on the following line - where 'sizeof (page_map.arrayZ()[0])' got changed to 'sizeof (page_map[0])'. This is the general form for each error:-

harfbuzz\src\hb-set.hh(378) : error C2666: 'hb_vector_t<Type,StaticSize>::operator []' : 4 overloads have similar conversions
: could be 'const hb_set_t::page_t &hb_vector_t<Type,StaticSize>::operator [](unsigned int) const'
: or 'hb_set_t::page_t &hb_vector_t<Type,StaticSize>::operator [](unsigned int)'
: or 'built-in C++ operator[(T *, int)'
: or 'built-in C++ operator[(const T *, int)'

I'm also seeing "multiple overload" errors in other places - e.g. for DEFINE_SIZE_ARRAY and its variants. As it happens, this project needs to get built with MSVC2008 - although these particular errors look like they'd occur, even with the more recent versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions