Make Client move-constructible (#1051)
This commit is contained in:
parent
549cdf2f7d
commit
e1efa337a2
@ -1161,6 +1161,8 @@ public:
|
|||||||
const std::string &client_cert_path,
|
const std::string &client_cert_path,
|
||||||
const std::string &client_key_path);
|
const std::string &client_key_path);
|
||||||
|
|
||||||
|
Client(Client &&) = default;
|
||||||
|
|
||||||
~Client();
|
~Client();
|
||||||
|
|
||||||
bool is_valid() const;
|
bool is_valid() const;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
#define SERVER_CERT_FILE "./cert.pem"
|
#define SERVER_CERT_FILE "./cert.pem"
|
||||||
#define SERVER_CERT2_FILE "./cert2.pem"
|
#define SERVER_CERT2_FILE "./cert2.pem"
|
||||||
@ -40,6 +41,11 @@ MultipartFormData &get_file_value(MultipartFormDataItems &files,
|
|||||||
throw std::runtime_error("invalid mulitpart form data name error");
|
throw std::runtime_error("invalid mulitpart form data name error");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(ConstructorTest, MoveConstructible) {
|
||||||
|
EXPECT_FALSE(std::is_copy_constructible<Client>::value);
|
||||||
|
EXPECT_TRUE(std::is_nothrow_move_constructible<Client>::value);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
TEST(StartupTest, WSAStartup) {
|
TEST(StartupTest, WSAStartup) {
|
||||||
WSADATA wsaData;
|
WSADATA wsaData;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user