[libcxx-commits] [PATCH] D91136: [4/N] [libcxx] Reorder the two u8path functions, to make the following diff more readable. NFC.
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Dec 10 13:53:54 PST 2020
mstorsjo updated this revision to Diff 311015.
mstorsjo set the repository for this revision to rG LLVM Github Monorepo.
mstorsjo added a comment.
Rebased, readd the repository
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91136/new/
https://reviews.llvm.org/D91136
Files:
libcxx/include/filesystem
Index: libcxx/include/filesystem
===================================================================
--- libcxx/include/filesystem
+++ libcxx/include/filesystem
@@ -1362,39 +1362,39 @@
_LIBCPP_FUNC_VIS
size_t hash_value(const path& __p) noexcept;
-template <class _Source>
+template <class _InputIt>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
- typename enable_if<__is_pathable<_Source>::value, path>::type
- u8path(const _Source& __s) {
+ typename enable_if<__is_pathable<_InputIt>::value, path>::type
+ u8path(_InputIt __f, _InputIt __l) {
static_assert(
#ifndef _LIBCPP_NO_HAS_CHAR8_T
- is_same<typename __is_pathable<_Source>::__char_type, char8_t>::value ||
+ is_same<typename __is_pathable<_InputIt>::__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'"
+ is_same<typename __is_pathable<_InputIt>::__char_type, char>::value,
+ "u8path(Iter, Iter) requires Iter have a value_type of type 'char'"
#ifndef _LIBCPP_NO_HAS_CHAR8_T
" or 'char8_t'"
#endif
);
- return path(__s);
+ return path(__f, __l);
}
-template <class _InputIt>
+template <class _Source>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
- typename enable_if<__is_pathable<_InputIt>::value, path>::type
- u8path(_InputIt __f, _InputIt __l) {
+ 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<_InputIt>::__char_type, char8_t>::value ||
+ is_same<typename __is_pathable<_Source>::__char_type, char8_t>::value ||
#endif
- is_same<typename __is_pathable<_InputIt>::__char_type, char>::value,
- "u8path(Iter, Iter) requires Iter have a value_type of type 'char'"
+ is_same<typename __is_pathable<_Source>::__char_type, char>::value,
+ "u8path(Source const&) requires Source have a character type of type "
+ "'char'"
#ifndef _LIBCPP_NO_HAS_CHAR8_T
" or 'char8_t'"
#endif
);
- return path(__f, __l);
+ return path(__s);
}
class _LIBCPP_TYPE_VIS path::iterator {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91136.311015.patch
Type: text/x-patch
Size: 2266 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201210/1ec56255/attachment.bin>
More information about the libcxx-commits
mailing list