mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 09:18:27 +00:00
Added move assignment operator to Client class. (#1873)
This commit is contained in:
parent
177d8420a1
commit
8cd0ed0509
2 changed files with 8 additions and 1 deletions
|
@ -1530,6 +1530,7 @@ public:
|
||||||
const std::string &client_key_path);
|
const std::string &client_key_path);
|
||||||
|
|
||||||
Client(Client &&) = default;
|
Client(Client &&) = default;
|
||||||
|
Client &operator=(Client &&) = default;
|
||||||
|
|
||||||
~Client();
|
~Client();
|
||||||
|
|
||||||
|
|
|
@ -54,11 +54,17 @@ MultipartFormData &get_file_value(MultipartFormDataItems &files,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(ConstructorTest, MoveConstructible) {
|
TEST(ClientTest, MoveConstructible) {
|
||||||
EXPECT_FALSE(std::is_copy_constructible<Client>::value);
|
EXPECT_FALSE(std::is_copy_constructible<Client>::value);
|
||||||
EXPECT_TRUE(std::is_nothrow_move_constructible<Client>::value);
|
EXPECT_TRUE(std::is_nothrow_move_constructible<Client>::value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(ClientTest, MoveAssignable)
|
||||||
|
{
|
||||||
|
EXPECT_FALSE(std::is_copy_assignable<Client>::value);
|
||||||
|
EXPECT_TRUE(std::is_nothrow_move_assignable<Client>::value);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
TEST(StartupTest, WSAStartup) {
|
TEST(StartupTest, WSAStartup) {
|
||||||
WSADATA wsaData;
|
WSADATA wsaData;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue