Skip to content

Commit b284039

Browse files
committed
Added move assignment operator to Client class.
1 parent 388a8c0 commit b284039

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

httplib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,7 @@ class Client {
15301530
const std::string &client_key_path);
15311531

15321532
Client(Client &&) = default;
1533+
Client &operator=(Client &&) = default;
15331534

15341535
~Client();
15351536

test/test.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,17 @@ MultipartFormData &get_file_value(MultipartFormDataItems &files,
5454
#endif
5555
}
5656

57-
TEST(ConstructorTest, MoveConstructible) {
57+
TEST(ClientTest, MoveConstructible) {
5858
EXPECT_FALSE(std::is_copy_constructible<Client>::value);
5959
EXPECT_TRUE(std::is_nothrow_move_constructible<Client>::value);
6060
}
6161

62+
TEST(ClientTest, MoveAssignable)
63+
{
64+
EXPECT_FALSE(std::is_copy_assignable<Client>::value);
65+
EXPECT_TRUE(std::is_nothrow_move_assignable<Client>::value);
66+
}
67+
6268
#ifdef _WIN32
6369
TEST(StartupTest, WSAStartup) {
6470
WSADATA wsaData;

0 commit comments

Comments
 (0)