@@ -116,7 +116,7 @@ struct TemplatedApp {
116
116
}
117
117
118
118
us_socket_context_remove_server_name (SSL, (struct us_socket_context_t *) httpContext, hostname_pattern.c_str ());
119
- return std::move (*this );
119
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
120
120
}
121
121
122
122
BuilderPatternReturnType &&missingServerName(MoveOnlyFunction<void (const char *hostname)> handler) {
@@ -132,7 +132,7 @@ struct TemplatedApp {
132
132
});
133
133
}
134
134
135
- return std::move (*this );
135
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
136
136
}
137
137
138
138
/* Returns the SSL_CTX of this app, or nullptr. */
@@ -144,7 +144,7 @@ struct TemplatedApp {
144
144
BuilderPatternReturnType &&filter(MoveOnlyFunction<void (HttpResponse<SSL> *, int )> &&filterHandler) {
145
145
httpContext->filter (std::move (filterHandler));
146
146
147
- return std::move (*this );
147
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
148
148
}
149
149
150
150
/* Publishes a message to all websocket contexts - conceptually as if publishing to the one single
@@ -265,7 +265,7 @@ struct TemplatedApp {
265
265
us_socket_context_close (SSL, (struct us_socket_context_t *) webSocketContext);
266
266
}
267
267
268
- return std::move (*this );
268
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
269
269
}
270
270
271
271
template <typename UserData>
@@ -475,49 +475,49 @@ struct TemplatedApp {
475
475
if (httpContext) {
476
476
httpContext->onHttp (" OPTIONS" , pattern, std::move (handler));
477
477
}
478
- return std::move (*this );
478
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
479
479
}
480
480
481
481
BuilderPatternReturnType &&del(std::string pattern, MoveOnlyFunction<void (HttpResponse<SSL> *, HttpRequest *)> &&handler) {
482
482
if (httpContext) {
483
483
httpContext->onHttp (" DELETE" , pattern, std::move (handler));
484
484
}
485
- return std::move (*this );
485
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
486
486
}
487
487
488
488
BuilderPatternReturnType &&patch(std::string pattern, MoveOnlyFunction<void (HttpResponse<SSL> *, HttpRequest *)> &&handler) {
489
489
if (httpContext) {
490
490
httpContext->onHttp (" PATCH" , pattern, std::move (handler));
491
491
}
492
- return std::move (*this );
492
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
493
493
}
494
494
495
495
BuilderPatternReturnType &&put(std::string pattern, MoveOnlyFunction<void (HttpResponse<SSL> *, HttpRequest *)> &&handler) {
496
496
if (httpContext) {
497
497
httpContext->onHttp (" PUT" , pattern, std::move (handler));
498
498
}
499
- return std::move (*this );
499
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
500
500
}
501
501
502
502
BuilderPatternReturnType &&head(std::string pattern, MoveOnlyFunction<void (HttpResponse<SSL> *, HttpRequest *)> &&handler) {
503
503
if (httpContext) {
504
504
httpContext->onHttp (" HEAD" , pattern, std::move (handler));
505
505
}
506
- return std::move (*this );
506
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
507
507
}
508
508
509
509
BuilderPatternReturnType &&connect(std::string pattern, MoveOnlyFunction<void (HttpResponse<SSL> *, HttpRequest *)> &&handler) {
510
510
if (httpContext) {
511
511
httpContext->onHttp (" CONNECT" , pattern, std::move (handler));
512
512
}
513
- return std::move (*this );
513
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
514
514
}
515
515
516
516
BuilderPatternReturnType &&trace(std::string pattern, MoveOnlyFunction<void (HttpResponse<SSL> *, HttpRequest *)> &&handler) {
517
517
if (httpContext) {
518
518
httpContext->onHttp (" TRACE" , pattern, std::move (handler));
519
519
}
520
- return std::move (*this );
520
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
521
521
}
522
522
523
523
/* This one catches any method */
@@ -534,7 +534,7 @@ struct TemplatedApp {
534
534
return listen (port, std::move (handler));
535
535
}
536
536
handler (httpContext ? httpContext->listen (host.c_str (), port, 0 ) : nullptr );
537
- return std::move (*this );
537
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
538
538
}
539
539
540
540
/* Host, port, options, callback */
@@ -543,7 +543,7 @@ struct TemplatedApp {
543
543
return listen (port, options, std::move (handler));
544
544
}
545
545
handler (httpContext ? httpContext->listen (host.c_str (), port, options) : nullptr );
546
- return std::move (*this );
546
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
547
547
}
548
548
549
549
/* Port, callback */
@@ -555,19 +555,19 @@ struct TemplatedApp {
555
555
/* Port, options, callback */
556
556
BuilderPatternReturnType &&listen(int port, int options, MoveOnlyFunction<void (us_listen_socket_t *)> &&handler) {
557
557
handler (httpContext ? httpContext->listen (nullptr , port, options) : nullptr );
558
- return std::move (*this );
558
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
559
559
}
560
560
561
561
/* options, callback, path to unix domain socket */
562
562
BuilderPatternReturnType &&listen(int options, MoveOnlyFunction<void (us_listen_socket_t *)> &&handler, std::string path) {
563
563
handler (httpContext ? httpContext->listen (path.c_str (), options) : nullptr );
564
- return std::move (*this );
564
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
565
565
}
566
566
567
567
/* callback, path to unix domain socket */
568
568
BuilderPatternReturnType &&listen(MoveOnlyFunction<void (us_listen_socket_t *)> &&handler, std::string path) {
569
569
handler (httpContext ? httpContext->listen (path.c_str (), 0 ) : nullptr );
570
- return std::move (*this );
570
+ return std::move (static_cast <BuilderPatternReturnType &&>( *this ) );
571
571
}
572
572
573
573
/* Register event handler for accepted FD. Can be used together with adoptSocket. */
0 commit comments