diff options
author | Louis Dionne <ldionne@apple.com> | 2018-11-28 15:22:30 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2018-11-28 15:22:30 +0000 |
commit | 6bc632fa1aeb1167634c08ab3f8e5596a6504311 (patch) | |
tree | 20e0aeeedfb0c99df03ee4d60ca42d6e813103da /include | |
parent | c56c9cffe67497338499856203a9fe07e505f902 (diff) | |
download | libcxx-6bc632fa1aeb1167634c08ab3f8e5596a6504311.tar.gz |
[libcxx] Apply _LIBCPP_INLINE_VISIBILITY for std::hash for string_view
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/string_view | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/include/string_view b/include/string_view index 55dce7271..dd425a2e8 100644 --- a/include/string_view +++ b/include/string_view @@ -778,17 +778,12 @@ template<class _CharT, class _Traits> struct _LIBCPP_TEMPLATE_VIS hash<basic_string_view<_CharT, _Traits> > : public unary_function<basic_string_view<_CharT, _Traits>, 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<class _CharT, class _Traits> -size_t -hash<basic_string_view<_CharT, _Traits> >::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 |