aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc')
-rw-r--r--gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc59
1 files changed, 42 insertions, 17 deletions
diff --git a/gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc b/gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc
index 08a5727..133426e 100644
--- a/gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc
+++ b/gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc
@@ -52,33 +52,58 @@ namespace std _GLIBCXX_VISIBILITY(default)
#ifndef _GLIBCXX_LONG_DOUBLE_COMPAT_IMPL
template<>
- size_t
- hash<string>::operator()(string __s) const
- { return _Hash_impl::hash(__s.data(), __s.length()); }
+ struct hash<string>
+ {
+ size_t operator()(string) const;
+ };
+
+ size_t
+ hash<string>::operator()(string __s) const
+ { return _Hash_impl::hash(__s.data(), __s.length()); }
template<>
- size_t
- hash<const string&>::operator()(const string& __s) const
- { return _Hash_impl::hash(__s.data(), __s.length()); }
+ struct hash<const string&>
+ {
+ size_t operator()(const string&) const;
+ };
+
+ size_t
+ hash<const string&>::operator()(const string& __s) const
+ { return _Hash_impl::hash(__s.data(), __s.length()); }
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
- size_t
- hash<wstring>::operator()(wstring __s) const
- { return _Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); }
+ struct hash<wstring>
+ {
+ size_t operator()(wstring) const;
+ };
+
+ size_t
+ hash<wstring>::operator()(wstring __s) const
+ { return _Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); }
template<>
- size_t
- hash<const wstring&>::operator()(const wstring& __s) const
- { return _Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); }
+ struct hash<const wstring&>
+ {
+ size_t operator()(const wstring&) const;
+ };
+
+ size_t
+ hash<const wstring&>::operator()(const wstring& __s) const
+ { return _Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); }
#endif
#endif
template<>
- size_t
- hash<error_code>::operator()(error_code __e) const
+ struct hash<error_code>
{
- const size_t __tmp = std::_Hash_impl::hash(__e._M_value);
- return std::_Hash_impl::__hash_combine(__e._M_cat, __tmp);
- }
+ size_t operator()(error_code) const;
+ };
+
+ size_t
+ hash<error_code>::operator()(error_code __e) const
+ {
+ const size_t __tmp = std::_Hash_impl::hash(__e._M_value);
+ return std::_Hash_impl::__hash_combine(__e._M_cat, __tmp);
+ }
}