@@ -33,11 +33,7 @@ namespace httpserver
3333class basic_auth_fail_response : public string_response
3434{
3535 public:
36- basic_auth_fail_response ():
37- string_response (),
38- realm (" " )
39- {
40- }
36+ basic_auth_fail_response () = default ;
4137
4238 explicit basic_auth_fail_response (
4339 const std::string& content,
@@ -50,46 +46,17 @@ class basic_auth_fail_response : public string_response
5046 {
5147 }
5248
53- basic_auth_fail_response (const basic_auth_fail_response& other):
54- string_response (other),
55- realm (other.realm)
56- {
57- }
58-
59- basic_auth_fail_response (basic_auth_fail_response&& other) noexcept :
60- string_response (std::move(other)),
61- realm (std::move(other.realm))
62- {
63- }
64-
65- basic_auth_fail_response& operator =(const basic_auth_fail_response& b)
66- {
67- if (this == &b) return *this ;
68-
69- (string_response&) (*this ) = b;
70- this ->realm = b.realm ;
49+ basic_auth_fail_response (const basic_auth_fail_response& other) = default ;
50+ basic_auth_fail_response (basic_auth_fail_response&& other) noexcept = default ;
51+ basic_auth_fail_response& operator =(const basic_auth_fail_response& b) = default ;
52+ basic_auth_fail_response& operator =(basic_auth_fail_response&& b) = default ;
7153
72- return *this ;
73- }
74-
75- basic_auth_fail_response& operator =(basic_auth_fail_response&& b)
76- {
77- if (this == &b) return *this ;
78-
79- (string_response&) (*this ) = std::move (b);
80- this ->realm = std::move (b.realm );
81-
82- return *this ;
83- }
84-
85- ~basic_auth_fail_response ()
86- {
87- }
54+ ~basic_auth_fail_response () = default ;
8855
8956 int enqueue_response (MHD_Connection* connection, MHD_Response* response);
9057
9158 private:
92- std::string realm;
59+ std::string realm = " " ;
9360};
9461
9562}
0 commit comments