[libcxx-commits] [libcxx] 48c6500 - [libcxx] Reorder the two u8path functions, to make the following diff more readable. NFC.
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Dec 18 01:25:21 PST 2020
Author: Martin Storsjö
Date: 2020-12-18T11:24:52+02:00
New Revision: 48c6500b5bfa60dfe6ca5f407fcdbf5ddff0c289
URL: https://github.com/llvm/llvm-project/commit/48c6500b5bfa60dfe6ca5f407fcdbf5ddff0c289
DIFF: https://github.com/llvm/llvm-project/commit/48c6500b5bfa60dfe6ca5f407fcdbf5ddff0c289.diff
LOG: [libcxx] Reorder the two u8path functions, to make the following diff more readable. NFC.
Differential Revision: https://reviews.llvm.org/D91136
Added:
Modified:
libcxx/include/filesystem
Removed:
################################################################################
diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem
index 7aeabeb2d1ec..adc863f052db 100644
--- a/libcxx/include/filesystem
+++ b/libcxx/include/filesystem
@@ -1362,20 +1362,6 @@ inline _LIBCPP_INLINE_VISIBILITY void swap(path& __lhs, path& __rhs) noexcept {
_LIBCPP_FUNC_VIS
size_t hash_value(const path& __p) noexcept;
-template <class _Source>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
- typename enable_if<__is_pathable<_Source>::value, path>::type
- u8path(const _Source& __s) {
- static_assert(
-#ifndef _LIBCPP_NO_HAS_CHAR8_T
- is_same<typename __is_pathable<_Source>::__char_type, char8_t>::value ||
-#endif
- is_same<typename __is_pathable<_Source>::__char_type, char>::value,
- "u8path(Source const&) requires Source have a character type of type "
- "'char' or 'char8_t'");
- return path(__s);
-}
-
template <class _InputIt>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
typename enable_if<__is_pathable<_InputIt>::value, path>::type
@@ -1390,6 +1376,20 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
return path(__f, __l);
}
+template <class _Source>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
+ typename enable_if<__is_pathable<_Source>::value, path>::type
+ u8path(const _Source& __s) {
+ static_assert(
+#ifndef _LIBCPP_NO_HAS_CHAR8_T
+ is_same<typename __is_pathable<_Source>::__char_type, char8_t>::value ||
+#endif
+ is_same<typename __is_pathable<_Source>::__char_type, char>::value,
+ "u8path(Source const&) requires Source have a character type of type "
+ "'char' or 'char8_t'");
+ return path(__s);
+}
+
class _LIBCPP_TYPE_VIS path::iterator {
public:
enum _ParserState : unsigned char {
More information about the libcxx-commits
mailing list