[cplusplus] Fix build on GCC < 7
This commit is contained in:
parent
386e1bbad8
commit
7b51bc95d9
|
@ -166,8 +166,14 @@ HB_DEFINE_VTABLE (unicode_funcs);
|
||||||
|
|
||||||
} // namespace hb
|
} // namespace hb
|
||||||
|
|
||||||
|
/* Workaround for GCC < 7, see:
|
||||||
|
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
|
||||||
|
* https://stackoverflow.com/a/25594741 */
|
||||||
|
namespace std {
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct std::hash<hb::shared_ptr<T>>
|
struct hash<hb::shared_ptr<T>>
|
||||||
{
|
{
|
||||||
std::size_t operator()(const hb::shared_ptr<T>& v) const noexcept
|
std::size_t operator()(const hb::shared_ptr<T>& v) const noexcept
|
||||||
{
|
{
|
||||||
|
@ -177,7 +183,7 @@ struct std::hash<hb::shared_ptr<T>>
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct std::hash<hb::unique_ptr<T>>
|
struct hash<hb::unique_ptr<T>>
|
||||||
{
|
{
|
||||||
std::size_t operator()(const hb::unique_ptr<T>& v) const noexcept
|
std::size_t operator()(const hb::unique_ptr<T>& v) const noexcept
|
||||||
{
|
{
|
||||||
|
@ -187,6 +193,8 @@ struct std::hash<hb::unique_ptr<T>>
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace std
|
||||||
|
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif /* HB_CPLUSPLUS_HH */
|
#endif /* HB_CPLUSPLUS_HH */
|
||||||
|
|
Loading…
Reference in New Issue