From 2aa46f840c2c128fbee9fde84ed9ca9a513ca7a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=20C=C5=93ur?= Date: Sat, 12 Nov 2022 01:18:17 +0800 Subject: [PATCH] Remove std::enable_if (#4139) --- libtransmission/file.h | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/libtransmission/file.h b/libtransmission/file.h index 78b267e10..522d357e5 100644 --- a/libtransmission/file.h +++ b/libtransmission/file.h @@ -177,7 +177,7 @@ bool tr_sys_path_copy(char const* src_path, char const* dst_path, struct tr_erro */ bool tr_sys_path_exists(char const* path, struct tr_error** error = nullptr); -template::value>> +template bool tr_sys_path_exists(T const& path, struct tr_error** error = nullptr) { return tr_sys_path_exists(path.c_str(), error); @@ -209,11 +209,7 @@ bool tr_sys_path_is_relative(std::string_view path); */ bool tr_sys_path_is_same(char const* path1, char const* path2, struct tr_error** error = nullptr); -template< - typename T, - typename U, - typename = std::enable_if::value>, - typename = std::enable_if::value>> +template bool tr_sys_path_is_same(T const& path1, U const& path2, struct tr_error** error = nullptr) { return tr_sys_path_is_same(path1.c_str(), path2.c_str(), error); @@ -267,11 +263,7 @@ std::string_view tr_sys_path_dirname(std::string_view path); */ bool tr_sys_path_rename(char const* src_path, char const* dst_path, struct tr_error** error = nullptr); -template< - typename T, - typename U, - typename = std::enable_if::value>, - typename = std::enable_if::value>> +template bool tr_sys_path_rename(T const& src_path, U const& dst_path, struct tr_error** error = nullptr) { return tr_sys_path_rename(src_path.c_str(), dst_path.c_str(), error); @@ -290,7 +282,7 @@ bool tr_sys_path_rename(T const& src_path, U const& dst_path, struct tr_error** */ bool tr_sys_path_remove(char const* path, struct tr_error** error = nullptr); -template::value>> +template bool tr_sys_path_remove(T const& path, struct tr_error** error = nullptr) { return tr_sys_path_remove(path.c_str(), error); @@ -564,7 +556,7 @@ std::string tr_sys_dir_get_current(struct tr_error** error = nullptr); */ bool tr_sys_dir_create(char const* path, int flags, int permissions, struct tr_error** error = nullptr); -template::value>> +template bool tr_sys_dir_create(T const& path, int flags, int permissions, struct tr_error** error = nullptr) { return tr_sys_dir_create(path.c_str(), flags, permissions, error);