Skip to content

Commit 48c6500

Browse files
committed
[libcxx] Reorder the two u8path functions, to make the following diff more readable. NFC.
Differential Revision: https://reviews.llvm.org/D91136
1 parent e83e0ca commit 48c6500

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

libcxx/include/filesystem

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,20 +1362,6 @@ inline _LIBCPP_INLINE_VISIBILITY void swap(path& __lhs, path& __rhs) noexcept {
13621362
_LIBCPP_FUNC_VIS
13631363
size_t hash_value(const path& __p) noexcept;
13641364

1365-
template <class _Source>
1366-
_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
1367-
typename enable_if<__is_pathable<_Source>::value, path>::type
1368-
u8path(const _Source& __s) {
1369-
static_assert(
1370-
#ifndef _LIBCPP_NO_HAS_CHAR8_T
1371-
is_same<typename __is_pathable<_Source>::__char_type, char8_t>::value ||
1372-
#endif
1373-
is_same<typename __is_pathable<_Source>::__char_type, char>::value,
1374-
"u8path(Source const&) requires Source have a character type of type "
1375-
"'char' or 'char8_t'");
1376-
return path(__s);
1377-
}
1378-
13791365
template <class _InputIt>
13801366
_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
13811367
typename enable_if<__is_pathable<_InputIt>::value, path>::type
@@ -1390,6 +1376,20 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
13901376
return path(__f, __l);
13911377
}
13921378

1379+
template <class _Source>
1380+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
1381+
typename enable_if<__is_pathable<_Source>::value, path>::type
1382+
u8path(const _Source& __s) {
1383+
static_assert(
1384+
#ifndef _LIBCPP_NO_HAS_CHAR8_T
1385+
is_same<typename __is_pathable<_Source>::__char_type, char8_t>::value ||
1386+
#endif
1387+
is_same<typename __is_pathable<_Source>::__char_type, char>::value,
1388+
"u8path(Source const&) requires Source have a character type of type "
1389+
"'char' or 'char8_t'");
1390+
return path(__s);
1391+
}
1392+
13931393
class _LIBCPP_TYPE_VIS path::iterator {
13941394
public:
13951395
enum _ParserState : unsigned char {

0 commit comments

Comments
 (0)