diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-11-29 17:43:55 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2019-11-29 17:43:55 +0000 |
commit | f138cee2ff25318432679a6d289659363099a462 (patch) | |
tree | 30efe5340285465aa2244b8bb47f414b38579854 | |
parent | 645a39afa50d67d68c882436ee9e1aa6546689af (diff) |
libstdc++: Adjust some function templates for coding conventions
* include/bits/fs_path.h (path::operator/=): Change template-head to
use typename instead of class.
* include/experimental/bits/fs_path.h (path::operator/=): Likewise.
* include/std/ostream (operator<<): Likewise.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278859 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/fs_path.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/experimental/bits/fs_path.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/std/ostream | 40 |
4 files changed, 29 insertions, 22 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5cc6aacc016..ded6e5c139b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2019-11-29 Jonathan Wakely <jwakely@redhat.com> + + * include/bits/fs_path.h (path::operator/=): Change template-head to + use typename instead of class. + * include/experimental/bits/fs_path.h (path::operator/=): Likewise. + * include/std/ostream (operator<<): Likewise. + 2019-11-29 Tom Honermann <tom@honermann.net> New tests diff --git a/libstdc++-v3/include/bits/fs_path.h b/libstdc++-v3/include/bits/fs_path.h index 643478292cd..b129372447b 100644 --- a/libstdc++-v3/include/bits/fs_path.h +++ b/libstdc++-v3/include/bits/fs_path.h @@ -272,7 +272,7 @@ namespace __detail path& operator/=(const path& __p); - template <class _Source> + template<typename _Source> __detail::_Path<_Source>& operator/=(_Source const& __source) { diff --git a/libstdc++-v3/include/experimental/bits/fs_path.h b/libstdc++-v3/include/experimental/bits/fs_path.h index b924fbfd5f6..91202e5b008 100644 --- a/libstdc++-v3/include/experimental/bits/fs_path.h +++ b/libstdc++-v3/include/experimental/bits/fs_path.h @@ -278,7 +278,7 @@ namespace __detail path& operator/=(const path& __p) { return _M_append(__p._M_pathname); } - template <class _Source> + template<typename _Source> __detail::_Path<_Source>& operator/=(_Source const& __source) { return append(__source); } diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream index 771c28db7b7..895e4d7ab4e 100644 --- a/libstdc++-v3/include/std/ostream +++ b/libstdc++-v3/include/std/ostream @@ -512,18 +512,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return (__out << __out.widen(__c)); } // Specialization - template <class _Traits> + template<typename _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, char __c) { return __ostream_insert(__out, &__c, 1); } // Signed and unsigned - template<class _Traits> + template<typename _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, signed char __c) { return (__out << static_cast<char>(__c)); } - template<class _Traits> + template<typename _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) { return (__out << static_cast<char>(__c)); } @@ -533,37 +533,37 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // numeric values. #ifdef _GLIBCXX_USE_WCHAR_T - template<class _Traits> + template<typename _Traits> basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, wchar_t) = delete; #endif // _GLIBCXX_USE_WCHAR_T #ifdef _GLIBCXX_USE_CHAR8_T - template<class _Traits> + template<typename _Traits> basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char8_t) = delete; #endif - template<class _Traits> + template<typename _Traits> basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char16_t) = delete; - template<class _Traits> + template<typename _Traits> basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char32_t) = delete; #ifdef _GLIBCXX_USE_WCHAR_T #ifdef _GLIBCXX_USE_CHAR8_T - template<class _Traits> + template<typename _Traits> basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char8_t) = delete; #endif // _GLIBCXX_USE_CHAR8_T - template<class _Traits> + template<typename _Traits> basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char16_t) = delete; - template<class _Traits> + template<typename _Traits> basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char32_t) = delete; #endif // _GLIBCXX_USE_WCHAR_T @@ -601,7 +601,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); // Partial specializations - template<class _Traits> + template<typename _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, const char* __s) { @@ -614,12 +614,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } // Signed and unsigned - template<class _Traits> + template<typename _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) { return (__out << reinterpret_cast<const char*>(__s)); } - template<class _Traits> + template<typename _Traits> inline basic_ostream<char, _Traits> & operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) { return (__out << reinterpret_cast<const char*>(__s)); } @@ -629,37 +629,37 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // pointer values. #ifdef _GLIBCXX_USE_WCHAR_T - template<class _Traits> + template<typename _Traits> basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const wchar_t*) = delete; #endif // _GLIBCXX_USE_WCHAR_T #ifdef _GLIBCXX_USE_CHAR8_T - template<class _Traits> + template<typename _Traits> basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char8_t*) = delete; #endif // _GLIBCXX_USE_CHAR8_T - template<class _Traits> + template<typename _Traits> basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char16_t*) = delete; - template<class _Traits> + template<typename _Traits> basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char32_t*) = delete; #ifdef _GLIBCXX_USE_WCHAR_T #ifdef _GLIBCXX_USE_CHAR8_T - template<class _Traits> + template<typename _Traits> basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char8_t*) = delete; #endif - template<class _Traits> + template<typename _Traits> basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char16_t*) = delete; - template<class _Traits> + template<typename _Traits> basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char32_t*) = delete; #endif // _GLIBCXX_USE_WCHAR_T |