From a86710f1e88a3779e8909b3bac768607b1bd1091 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 28 Nov 2018 15:22:30 +0000 Subject: [PATCH] [libcxx] Apply _LIBCPP_INLINE_VISIBILITY for std::hash for string_view llvm-svn: 347765 --- libcxx/include/string_view | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libcxx/include/string_view b/libcxx/include/string_view index 55dce7271b48..dd425a2e864e 100644 --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -778,17 +778,12 @@ template struct _LIBCPP_TEMPLATE_VIS hash > : public unary_function, size_t> { - size_t operator()(const basic_string_view<_CharT, _Traits> __val) const _NOEXCEPT; + _LIBCPP_INLINE_VISIBILITY + size_t operator()(const basic_string_view<_CharT, _Traits> __val) const _NOEXCEPT { + return __do_string_hash(__val.data(), __val.data() + __val.size()); + } }; -template -size_t -hash >::operator()( - const basic_string_view<_CharT, _Traits> __val) const _NOEXCEPT -{ - return __do_string_hash(__val.data(), __val.data() + __val.size()); -} - #if _LIBCPP_STD_VER > 11 inline namespace literals