Coverage Report

Created: 2023-09-25 07:17

/src/uWebSockets/src/MoveOnlyFunction.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
MIT License
3
4
Copyright (c) 2020 Oleg Fatkhiev
5
6
Permission is hereby granted, free of charge, to any person obtaining a copy
7
of this software and associated documentation files (the "Software"), to deal
8
in the Software without restriction, including without limitation the rights
9
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
copies of the Software, and to permit persons to whom the Software is
11
furnished to do so, subject to the following conditions:
12
13
The above copyright notice and this permission notice shall be included in all
14
copies or substantial portions of the Software.
15
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
SOFTWARE.
23
*/
24
25
/* Sources fetched from https://github.com/ofats/any_invocable on 2021-02-19. */
26
27
#ifndef _ANY_INVOKABLE_H_
28
#define _ANY_INVOKABLE_H_
29
30
#include <functional>
31
#include <memory>
32
#include <type_traits>
33
34
// clang-format off
35
/*
36
namespace std {
37
  template<class Sig> class any_invocable; // never defined
38
39
  template<class R, class... ArgTypes>
40
  class any_invocable<R(ArgTypes...) cv ref noexcept(noex)> {
41
  public:
42
    using result_type = R;
43
44
    // SECTION.3, construct/copy/destroy
45
    any_invocable() noexcept;
46
    any_invocable(nullptr_t) noexcept;
47
    any_invocable(any_invocable&&) noexcept;
48
    template<class F> any_invocable(F&&);
49
50
    template<class T, class... Args>
51
      explicit any_invocable(in_place_type_t<T>, Args&&...);
52
    template<class T, class U, class... Args>
53
      explicit any_invocable(in_place_type_t<T>, initializer_list<U>, Args&&...);
54
55
    any_invocable& operator=(any_invocable&&) noexcept;
56
    any_invocable& operator=(nullptr_t) noexcept;
57
    template<class F> any_invocable& operator=(F&&);
58
    template<class F> any_invocable& operator=(reference_wrapper<F>) noexcept;
59
60
    ~any_invocable();
61
62
    // SECTION.4, any_invocable modifiers
63
    void swap(any_invocable&) noexcept;
64
65
    // SECTION.5, any_invocable capacity
66
    explicit operator bool() const noexcept;
67
68
    // SECTION.6, any_invocable invocation
69
    R operator()(ArgTypes...) cv ref noexcept(noex);
70
71
    // SECTION.7, null pointer comparisons
72
    friend bool operator==(const any_invocable&, nullptr_t) noexcept;
73
74
    // SECTION.8, specialized algorithms
75
    friend void swap(any_invocable&, any_invocable&) noexcept;
76
  };
77
}
78
*/
79
// clang-format on
80
81
namespace ofats {
82
83
namespace any_detail {
84
85
using buffer = std::aligned_storage_t<sizeof(void*) * 2, alignof(void*)>;
86
87
template <class T>
88
inline constexpr bool is_small_object_v =
89
    sizeof(T) <= sizeof(buffer) && alignof(buffer) % alignof(T) == 0 &&
90
    std::is_nothrow_move_constructible_v<T>;
91
92
union storage {
93
  void* ptr_ = nullptr;
94
  buffer buf_;
95
};
96
97
enum class action { destroy, move };
98
99
template <class R, class... ArgTypes>
100
struct handler_traits {
101
  template <class Derived>
102
  struct handler_base {
103
454k
    static void handle(action act, storage* current, storage* other = nullptr) {
104
454k
      switch (act) {
105
351k
        case (action::destroy):
106
351k
          Derived::destroy(*current);
107
351k
          break;
108
103k
        case (action::move):
109
103k
          Derived::move(*current, *other);
110
103k
          break;
111
454k
      }
112
454k
    }
ofats::any_detail::handler_traits<void*, void*, uWS::HttpRequest*>::handler_base<ofats::any_detail::handler_traits<void*, void*, uWS::HttpRequest*>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, uWS::HttpRequest*)#1}> >::handle(ofats::any_detail::action, ofats::any_detail::storage*, ofats::any_detail::action)
Line
Count
Source
103
140k
    static void handle(action act, storage* current, storage* other = nullptr) {
104
140k
      switch (act) {
105
140k
        case (action::destroy):
106
140k
          Derived::destroy(*current);
107
140k
          break;
108
0
        case (action::move):
109
0
          Derived::move(*current, *other);
110
0
          break;
111
140k
      }
112
140k
    }
ofats::any_detail::handler_traits<void*, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::handler_base<ofats::any_detail::handler_traits<void*, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)#1}> >::handle(ofats::any_detail::action, ofats::any_detail::storage*, ofats::any_detail::action)
Line
Count
Source
103
140k
    static void handle(action act, storage* current, storage* other = nullptr) {
104
140k
      switch (act) {
105
140k
        case (action::destroy):
106
140k
          Derived::destroy(*current);
107
140k
          break;
108
0
        case (action::move):
109
0
          Derived::move(*current, *other);
110
0
          break;
111
140k
      }
112
140k
    }
Unexecuted instantiation: ofats::any_detail::handler_traits<bool, unsigned long>::handler_base<ofats::any_detail::handler_traits<bool, unsigned long>::small_handler<uWS::HttpResponseData<false>::callOnWritable(unsigned long)::{lambda(unsigned long)#1}> >::handle(ofats::any_detail::action, ofats::any_detail::storage*, ofats::any_detail::storage)
ofats::any_detail::handler_traits<bool, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::handler_base<ofats::any_detail::handler_traits<bool, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::large_handler<uWS::HttpContext<false>::onHttp(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, ofats::any_invocable<void (uWS::HttpResponse<false>*, uWS::HttpRequest*)>&&, bool)::{lambda(auto:1*)#1}> >::handle(ofats::any_detail::action, ofats::any_detail::storage*, ofats::any_detail::storage)
Line
Count
Source
103
3.44k
    static void handle(action act, storage* current, storage* other = nullptr) {
104
3.44k
      switch (act) {
105
1.72k
        case (action::destroy):
106
1.72k
          Derived::destroy(*current);
107
1.72k
          break;
108
1.72k
        case (action::move):
109
1.72k
          Derived::move(*current, *other);
110
1.72k
          break;
111
3.44k
      }
112
3.44k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void, uWS::HttpResponse<false>*, uWS::HttpRequest*>::handler_base<ofats::any_detail::handler_traits<void, uWS::HttpResponse<false>*, uWS::HttpRequest*>::small_handler<test()::$_0> >::handle(ofats::any_detail::action, ofats::any_detail::storage*, ofats::any_detail::storage*)
Line
Count
Source
103
5.17k
    static void handle(action act, storage* current, storage* other = nullptr) {
104
5.17k
      switch (act) {
105
1.72k
        case (action::destroy):
106
1.72k
          Derived::destroy(*current);
107
1.72k
          break;
108
3.44k
        case (action::move):
109
3.44k
          Derived::move(*current, *other);
110
3.44k
          break;
111
5.17k
      }
112
5.17k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::handler_base<ofats::any_detail::handler_traits<void>::small_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#1}> >::handle(ofats::any_detail::action, ofats::any_detail::storage*, ofats::any_detail::storage)
Line
Count
Source
103
90.9k
    static void handle(action act, storage* current, storage* other = nullptr) {
104
90.9k
      switch (act) {
105
25.4k
        case (action::destroy):
106
25.4k
          Derived::destroy(*current);
107
25.4k
          break;
108
65.5k
        case (action::move):
109
65.5k
          Derived::move(*current, *other);
110
65.5k
          break;
111
90.9k
      }
112
90.9k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::handler_base<ofats::any_detail::handler_traits<void>::large_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}> >::handle(ofats::any_detail::action, ofats::any_detail::storage*, ofats::any_detail::storage)
Line
Count
Source
103
58.0k
    static void handle(action act, storage* current, storage* other = nullptr) {
104
58.0k
      switch (act) {
105
25.4k
        case (action::destroy):
106
25.4k
          Derived::destroy(*current);
107
25.4k
          break;
108
32.6k
        case (action::move):
109
32.6k
          Derived::move(*current, *other);
110
32.6k
          break;
111
58.0k
      }
112
58.0k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::handler_base<ofats::any_detail::handler_traits<void>::large_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}::operator()() const::{lambda()#1}> >::handle(ofats::any_detail::action, ofats::any_detail::storage*, ofats::any_detail::action)
Line
Count
Source
103
14.6k
    static void handle(action act, storage* current, storage* other = nullptr) {
104
14.6k
      switch (act) {
105
14.6k
        case (action::destroy):
106
14.6k
          Derived::destroy(*current);
107
14.6k
          break;
108
0
        case (action::move):
109
0
          Derived::move(*current, *other);
110
0
          break;
111
14.6k
      }
112
14.6k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void, us_listen_socket_t*>::handler_base<ofats::any_detail::handler_traits<void, us_listen_socket_t*>::small_handler<test()::$_1> >::handle(ofats::any_detail::action, ofats::any_detail::storage*, ofats::any_detail::storage*)
Line
Count
Source
103
1.72k
    static void handle(action act, storage* current, storage* other = nullptr) {
104
1.72k
      switch (act) {
105
1.72k
        case (action::destroy):
106
1.72k
          Derived::destroy(*current);
107
1.72k
          break;
108
0
        case (action::move):
109
0
          Derived::move(*current, *other);
110
0
          break;
111
1.72k
      }
112
1.72k
    }
113
  };
114
115
  template <class T>
116
  struct small_handler : handler_base<small_handler<T>> {
117
    template <class... Args>
118
378k
    static void create(storage& s, Args&&... args) {
119
378k
      new (static_cast<void*>(&s.buf_)) T(std::forward<Args>(args)...);
120
378k
    }
void ofats::any_detail::handler_traits<void*, void*, uWS::HttpRequest*>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, uWS::HttpRequest*)#1}>::create<{lambda(us_socket_t*, char*, int)#1}>(ofats::any_detail::storage&, {lambda(us_socket_t*, char*, int)#1}&&)
Line
Count
Source
118
140k
    static void create(storage& s, Args&&... args) {
119
140k
      new (static_cast<void*>(&s.buf_)) T(std::forward<Args>(args)...);
120
140k
    }
void ofats::any_detail::handler_traits<void*, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)#1}>::create<{lambda(us_socket_t*, char*, int)#1}>(ofats::any_detail::storage&, {lambda(us_socket_t*, char*, int)#1}&&)
Line
Count
Source
118
140k
    static void create(storage& s, Args&&... args) {
119
140k
      new (static_cast<void*>(&s.buf_)) T(std::forward<Args>(args)...);
120
140k
    }
Unexecuted instantiation: void ofats::any_detail::handler_traits<bool, unsigned long>::small_handler<uWS::HttpResponseData<false>::callOnWritable(unsigned long)::{lambda(unsigned long)#1}>::create<{lambda(unsigned long)#1}>(ofats::any_detail::storage&, {lambda(unsigned long)#1}&&)
AsyncEpollHelloWorld.cpp:void ofats::any_detail::handler_traits<void, uWS::HttpResponse<false>*, uWS::HttpRequest*>::small_handler<test()::$_0>::create<test()::$_0>(ofats::any_detail::storage&, test()::$_0&&)
Line
Count
Source
118
5.17k
    static void create(storage& s, Args&&... args) {
119
5.17k
      new (static_cast<void*>(&s.buf_)) T(std::forward<Args>(args)...);
120
5.17k
    }
AsyncEpollHelloWorld.cpp:void ofats::any_detail::handler_traits<void>::small_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#1}>::create<{lambda()#1}>(ofats::any_detail::storage&, {lambda()#1}&&)
Line
Count
Source
118
90.9k
    static void create(storage& s, Args&&... args) {
119
90.9k
      new (static_cast<void*>(&s.buf_)) T(std::forward<Args>(args)...);
120
90.9k
    }
AsyncEpollHelloWorld.cpp:void ofats::any_detail::handler_traits<void, us_listen_socket_t*>::small_handler<test()::$_1>::create<test()::$_1>(ofats::any_detail::storage&, test()::$_1&&)
Line
Count
Source
118
1.72k
    static void create(storage& s, Args&&... args) {
119
1.72k
      new (static_cast<void*>(&s.buf_)) T(std::forward<Args>(args)...);
120
1.72k
    }
121
122
378k
    static void destroy(storage& s) noexcept {
123
378k
      T& value = *static_cast<T*>(static_cast<void*>(&s.buf_));
124
378k
      value.~T();
125
378k
    }
ofats::any_detail::handler_traits<void*, void*, uWS::HttpRequest*>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, uWS::HttpRequest*)#1}>::destroy(ofats::any_detail::storage&)
Line
Count
Source
122
140k
    static void destroy(storage& s) noexcept {
123
140k
      T& value = *static_cast<T*>(static_cast<void*>(&s.buf_));
124
140k
      value.~T();
125
140k
    }
ofats::any_detail::handler_traits<void*, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)#1}>::destroy(ofats::any_detail::storage&)
Line
Count
Source
122
140k
    static void destroy(storage& s) noexcept {
123
140k
      T& value = *static_cast<T*>(static_cast<void*>(&s.buf_));
124
140k
      value.~T();
125
140k
    }
Unexecuted instantiation: ofats::any_detail::handler_traits<bool, unsigned long>::small_handler<uWS::HttpResponseData<false>::callOnWritable(unsigned long)::{lambda(unsigned long)#1}>::destroy(ofats::any_detail::storage&)
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void, uWS::HttpResponse<false>*, uWS::HttpRequest*>::small_handler<test()::$_0>::destroy(ofats::any_detail::storage&)
Line
Count
Source
122
5.17k
    static void destroy(storage& s) noexcept {
123
5.17k
      T& value = *static_cast<T*>(static_cast<void*>(&s.buf_));
124
5.17k
      value.~T();
125
5.17k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::small_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#1}>::destroy(ofats::any_detail::storage&)
Line
Count
Source
122
90.9k
    static void destroy(storage& s) noexcept {
123
90.9k
      T& value = *static_cast<T*>(static_cast<void*>(&s.buf_));
124
90.9k
      value.~T();
125
90.9k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void, us_listen_socket_t*>::small_handler<test()::$_1>::destroy(ofats::any_detail::storage&)
Line
Count
Source
122
1.72k
    static void destroy(storage& s) noexcept {
123
1.72k
      T& value = *static_cast<T*>(static_cast<void*>(&s.buf_));
124
1.72k
      value.~T();
125
1.72k
    }
126
127
68.9k
    static void move(storage& dst, storage& src) noexcept {
128
68.9k
      create(dst, std::move(*static_cast<T*>(static_cast<void*>(&src.buf_))));
129
68.9k
      destroy(src);
130
68.9k
    }
Unexecuted instantiation: ofats::any_detail::handler_traits<void*, void*, uWS::HttpRequest*>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, uWS::HttpRequest*)#1}>::move(ofats::any_detail::storage&, ofats::any_detail::handler_traits<void*, void*, uWS::HttpRequest*>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, uWS::HttpRequest*)#1}>)
Unexecuted instantiation: ofats::any_detail::handler_traits<void*, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)#1}>::move(ofats::any_detail::storage&, ofats::any_detail::handler_traits<void*, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)#1}>)
Unexecuted instantiation: ofats::any_detail::handler_traits<bool, unsigned long>::small_handler<uWS::HttpResponseData<false>::callOnWritable(unsigned long)::{lambda(unsigned long)#1}>::move(ofats::any_detail::storage&, ofats::any_detail::storage)
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void, uWS::HttpResponse<false>*, uWS::HttpRequest*>::small_handler<test()::$_0>::move(ofats::any_detail::storage&, ofats::any_detail::storage&)
Line
Count
Source
127
3.44k
    static void move(storage& dst, storage& src) noexcept {
128
3.44k
      create(dst, std::move(*static_cast<T*>(static_cast<void*>(&src.buf_))));
129
3.44k
      destroy(src);
130
3.44k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::small_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#1}>::move(ofats::any_detail::storage&, ofats::any_detail::storage)
Line
Count
Source
127
65.5k
    static void move(storage& dst, storage& src) noexcept {
128
65.5k
      create(dst, std::move(*static_cast<T*>(static_cast<void*>(&src.buf_))));
129
65.5k
      destroy(src);
130
65.5k
    }
Unexecuted instantiation: AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void, us_listen_socket_t*>::small_handler<test()::$_1>::move(ofats::any_detail::storage&, ofats::any_detail::storage&)
131
132
93.2k
    static R call(storage& s, ArgTypes... args) {
133
93.2k
      return std::invoke(*static_cast<T*>(static_cast<void*>(&s.buf_)),
134
93.2k
                         std::forward<ArgTypes>(args)...);
135
93.2k
    }
ofats::any_detail::handler_traits<void*, void*, uWS::HttpRequest*>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, uWS::HttpRequest*)#1}>::call(ofats::any_detail::storage&, void*, uWS::HttpRequest*)
Line
Count
Source
132
29.9k
    static R call(storage& s, ArgTypes... args) {
133
29.9k
      return std::invoke(*static_cast<T*>(static_cast<void*>(&s.buf_)),
134
29.9k
                         std::forward<ArgTypes>(args)...);
135
29.9k
    }
ofats::any_detail::handler_traits<void*, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::small_handler<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)#1}>::call(ofats::any_detail::storage&, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)
Line
Count
Source
132
25.4k
    static R call(storage& s, ArgTypes... args) {
133
25.4k
      return std::invoke(*static_cast<T*>(static_cast<void*>(&s.buf_)),
134
25.4k
                         std::forward<ArgTypes>(args)...);
135
25.4k
    }
Unexecuted instantiation: ofats::any_detail::handler_traits<bool, unsigned long>::small_handler<uWS::HttpResponseData<false>::callOnWritable(unsigned long)::{lambda(unsigned long)#1}>::call(ofats::any_detail::storage&, unsigned long)
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void, uWS::HttpResponse<false>*, uWS::HttpRequest*>::small_handler<test()::$_0>::call(ofats::any_detail::storage&, uWS::HttpResponse<false>*, uWS::HttpRequest*)
Line
Count
Source
132
25.4k
    static R call(storage& s, ArgTypes... args) {
133
25.4k
      return std::invoke(*static_cast<T*>(static_cast<void*>(&s.buf_)),
134
25.4k
                         std::forward<ArgTypes>(args)...);
135
25.4k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::small_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#1}>::call(ofats::any_detail::storage&)
Line
Count
Source
132
10.7k
    static R call(storage& s, ArgTypes... args) {
133
10.7k
      return std::invoke(*static_cast<T*>(static_cast<void*>(&s.buf_)),
134
10.7k
                         std::forward<ArgTypes>(args)...);
135
10.7k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void, us_listen_socket_t*>::small_handler<test()::$_1>::call(ofats::any_detail::storage&, us_listen_socket_t*)
Line
Count
Source
132
1.72k
    static R call(storage& s, ArgTypes... args) {
133
1.72k
      return std::invoke(*static_cast<T*>(static_cast<void*>(&s.buf_)),
134
1.72k
                         std::forward<ArgTypes>(args)...);
135
1.72k
    }
136
  };
137
138
  template <class T>
139
  struct large_handler : handler_base<large_handler<T>> {
140
    template <class... Args>
141
41.8k
    static void create(storage& s, Args&&... args) {
142
41.8k
      s.ptr_ = new T(std::forward<Args>(args)...);
143
41.8k
    }
void ofats::any_detail::handler_traits<bool, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::large_handler<uWS::HttpContext<false>::onHttp(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, ofats::any_invocable<void (uWS::HttpResponse<false>*, uWS::HttpRequest*)>&&, bool)::{lambda(auto:1*)#1}>::create<{lambda(auto:1*)#1}>(ofats::any_detail::storage&, {lambda(auto:1*)#1}&&)
Line
Count
Source
141
1.72k
    static void create(storage& s, Args&&... args) {
142
1.72k
      s.ptr_ = new T(std::forward<Args>(args)...);
143
1.72k
    }
AsyncEpollHelloWorld.cpp:void ofats::any_detail::handler_traits<void>::large_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}>::create<{lambda()#2}>(ofats::any_detail::storage&, {lambda()#2}&&)
Line
Count
Source
141
25.4k
    static void create(storage& s, Args&&... args) {
142
25.4k
      s.ptr_ = new T(std::forward<Args>(args)...);
143
25.4k
    }
AsyncEpollHelloWorld.cpp:void ofats::any_detail::handler_traits<void>::large_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}::operator()() const::{lambda()#1}>::create<{lambda()#2}>(ofats::any_detail::storage&, {lambda()#2}&&)
Line
Count
Source
141
14.6k
    static void create(storage& s, Args&&... args) {
142
14.6k
      s.ptr_ = new T(std::forward<Args>(args)...);
143
14.6k
    }
144
145
41.8k
    static void destroy(storage& s) noexcept { delete static_cast<T*>(s.ptr_); }
ofats::any_detail::handler_traits<bool, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::large_handler<uWS::HttpContext<false>::onHttp(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, ofats::any_invocable<void (uWS::HttpResponse<false>*, uWS::HttpRequest*)>&&, bool)::{lambda(auto:1*)#1}>::destroy(ofats::any_detail::storage&)
Line
Count
Source
145
1.72k
    static void destroy(storage& s) noexcept { delete static_cast<T*>(s.ptr_); }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::large_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}>::destroy(ofats::any_detail::storage&)
Line
Count
Source
145
25.4k
    static void destroy(storage& s) noexcept { delete static_cast<T*>(s.ptr_); }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::large_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}::operator()() const::{lambda()#1}>::destroy(ofats::any_detail::storage&)
Line
Count
Source
145
14.6k
    static void destroy(storage& s) noexcept { delete static_cast<T*>(s.ptr_); }
146
147
34.3k
    static void move(storage& dst, storage& src) noexcept {
148
34.3k
      dst.ptr_ = src.ptr_;
149
34.3k
    }
ofats::any_detail::handler_traits<bool, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::large_handler<uWS::HttpContext<false>::onHttp(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, ofats::any_invocable<void (uWS::HttpResponse<false>*, uWS::HttpRequest*)>&&, bool)::{lambda(auto:1*)#1}>::move(ofats::any_detail::storage&, ofats::any_detail::storage)
Line
Count
Source
147
1.72k
    static void move(storage& dst, storage& src) noexcept {
148
1.72k
      dst.ptr_ = src.ptr_;
149
1.72k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::large_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}>::move(ofats::any_detail::storage&, ofats::any_detail::storage)
Line
Count
Source
147
32.6k
    static void move(storage& dst, storage& src) noexcept {
148
32.6k
      dst.ptr_ = src.ptr_;
149
32.6k
    }
Unexecuted instantiation: AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::large_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}::operator()() const::{lambda()#1}>::move(ofats::any_detail::storage&, ofats::any_detail::handler_traits<void>::large_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}::operator()() const::{lambda()#1}>)
150
151
64.7k
    static R call(storage& s, ArgTypes... args) {
152
64.7k
      return std::invoke(*static_cast<T*>(s.ptr_),
153
64.7k
                         std::forward<ArgTypes>(args)...);
154
64.7k
    }
ofats::any_detail::handler_traits<bool, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::large_handler<uWS::HttpContext<false>::onHttp(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, ofats::any_invocable<void (uWS::HttpResponse<false>*, uWS::HttpRequest*)>&&, bool)::{lambda(auto:1*)#1}>::call(ofats::any_detail::storage&, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*)
Line
Count
Source
151
25.4k
    static R call(storage& s, ArgTypes... args) {
152
25.4k
      return std::invoke(*static_cast<T*>(s.ptr_),
153
25.4k
                         std::forward<ArgTypes>(args)...);
154
25.4k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::large_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}>::call(ofats::any_detail::storage&)
Line
Count
Source
151
24.6k
    static R call(storage& s, ArgTypes... args) {
152
24.6k
      return std::invoke(*static_cast<T*>(s.ptr_),
153
24.6k
                         std::forward<ArgTypes>(args)...);
154
24.6k
    }
AsyncEpollHelloWorld.cpp:ofats::any_detail::handler_traits<void>::large_handler<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}::operator()() const::{lambda()#1}>::call(ofats::any_detail::storage&)
Line
Count
Source
151
14.6k
    static R call(storage& s, ArgTypes... args) {
152
14.6k
      return std::invoke(*static_cast<T*>(s.ptr_),
153
14.6k
                         std::forward<ArgTypes>(args)...);
154
14.6k
    }
155
  };
156
157
  template <class T>
158
  using handler = std::conditional_t<is_small_object_v<T>, small_handler<T>,
159
                                     large_handler<T>>;
160
};
161
162
template <class T>
163
struct is_in_place_type : std::false_type {};
164
165
template <class T>
166
struct is_in_place_type<std::in_place_type_t<T>> : std::true_type {};
167
168
template <class T>
169
inline constexpr auto is_in_place_type_v = is_in_place_type<T>::value;
170
171
template <class R, bool is_noexcept, class... ArgTypes>
172
class any_invocable_impl {
173
  template <class T>
174
  using handler =
175
      typename any_detail::handler_traits<R, ArgTypes...>::template handler<T>;
176
177
  using storage = any_detail::storage;
178
  using action = any_detail::action;
179
  using handle_func = void (*)(any_detail::action, any_detail::storage*,
180
                               any_detail::storage*);
181
  using call_func = R (*)(any_detail::storage&, ArgTypes...);
182
183
 public:
184
  using result_type = R;
185
186
3.93M
  any_invocable_impl() noexcept = default;
ofats::any_detail::any_invocable_impl<void, false, char const*>::any_invocable_impl()
Line
Count
Source
186
1.72k
  any_invocable_impl() noexcept = default;
ofats::any_detail::any_invocable_impl<bool, false, unsigned long>::any_invocable_impl()
Line
Count
Source
186
1.19M
  any_invocable_impl() noexcept = default;
ofats::any_detail::any_invocable_impl<void, false>::any_invocable_impl()
Line
Count
Source
186
1.25M
  any_invocable_impl() noexcept = default;
ofats::any_detail::any_invocable_impl<void, false, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::any_invocable_impl()
Line
Count
Source
186
1.19M
  any_invocable_impl() noexcept = default;
ofats::any_detail::any_invocable_impl<void*, false, void*, uWS::HttpRequest*>::any_invocable_impl()
Line
Count
Source
186
140k
  any_invocable_impl() noexcept = default;
ofats::any_detail::any_invocable_impl<void*, false, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::any_invocable_impl()
Line
Count
Source
186
140k
  any_invocable_impl() noexcept = default;
ofats::any_detail::any_invocable_impl<bool, false, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::any_invocable_impl()
Line
Count
Source
186
1.72k
  any_invocable_impl() noexcept = default;
ofats::any_detail::any_invocable_impl<void, false, uWS::HttpResponse<false>*, uWS::HttpRequest*>::any_invocable_impl()
Line
Count
Source
186
1.72k
  any_invocable_impl() noexcept = default;
ofats::any_detail::any_invocable_impl<void, false, us_listen_socket_t*>::any_invocable_impl()
Line
Count
Source
186
1.72k
  any_invocable_impl() noexcept = default;
187
29.3k
  any_invocable_impl(std::nullptr_t) noexcept {}
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<void, false, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::any_invocable_impl(decltype(nullptr))
ofats::any_detail::any_invocable_impl<void, false>::any_invocable_impl(decltype(nullptr))
Line
Count
Source
187
14.6k
  any_invocable_impl(std::nullptr_t) noexcept {}
ofats::any_detail::any_invocable_impl<bool, false, unsigned long>::any_invocable_impl(decltype(nullptr))
Line
Count
Source
187
14.6k
  any_invocable_impl(std::nullptr_t) noexcept {}
188
63.2k
  any_invocable_impl(any_invocable_impl&& rhs) noexcept {
189
63.2k
    if (rhs.handle_) {
190
63.2k
      handle_ = rhs.handle_;
191
63.2k
      handle_(action::move, &storage_, &rhs.storage_);
192
63.2k
      call_ = rhs.call_;
193
63.2k
      rhs.handle_ = nullptr;
194
63.2k
    }
195
63.2k
  }
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<bool, false, unsigned long>::any_invocable_impl(ofats::any_detail::any_invocable_impl<bool, false, unsigned long>&&)
ofats::any_detail::any_invocable_impl<bool, false, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::any_invocable_impl(ofats::any_detail::any_invocable_impl<bool, false, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>&&)
Line
Count
Source
188
1.72k
  any_invocable_impl(any_invocable_impl&& rhs) noexcept {
189
1.72k
    if (rhs.handle_) {
190
1.72k
      handle_ = rhs.handle_;
191
1.72k
      handle_(action::move, &storage_, &rhs.storage_);
192
1.72k
      call_ = rhs.call_;
193
1.72k
      rhs.handle_ = nullptr;
194
1.72k
    }
195
1.72k
  }
ofats::any_detail::any_invocable_impl<void, false, uWS::HttpResponse<false>*, uWS::HttpRequest*>::any_invocable_impl(ofats::any_detail::any_invocable_impl<void, false, uWS::HttpResponse<false>*, uWS::HttpRequest*>&&)
Line
Count
Source
188
3.44k
  any_invocable_impl(any_invocable_impl&& rhs) noexcept {
189
3.44k
    if (rhs.handle_) {
190
3.44k
      handle_ = rhs.handle_;
191
3.44k
      handle_(action::move, &storage_, &rhs.storage_);
192
3.44k
      call_ = rhs.call_;
193
3.44k
      rhs.handle_ = nullptr;
194
3.44k
    }
195
3.44k
  }
ofats::any_detail::any_invocable_impl<void, false>::any_invocable_impl(ofats::any_detail::any_invocable_impl<void, false>&&)
Line
Count
Source
188
58.0k
  any_invocable_impl(any_invocable_impl&& rhs) noexcept {
189
58.0k
    if (rhs.handle_) {
190
58.0k
      handle_ = rhs.handle_;
191
58.0k
      handle_(action::move, &storage_, &rhs.storage_);
192
58.0k
      call_ = rhs.call_;
193
58.0k
      rhs.handle_ = nullptr;
194
58.0k
    }
195
58.0k
  }
196
197
25.4k
  any_invocable_impl& operator=(any_invocable_impl&& rhs) noexcept {
198
25.4k
    any_invocable_impl{std::move(rhs)}.swap(*this);
199
25.4k
    return *this;
200
25.4k
  }
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<bool, false, unsigned long>::operator=(ofats::any_detail::any_invocable_impl<bool, false, unsigned long>&&)
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<bool, false, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::operator=(ofats::any_detail::any_invocable_impl<bool, false, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>&&)
ofats::any_detail::any_invocable_impl<void, false>::operator=(ofats::any_detail::any_invocable_impl<void, false>&&)
Line
Count
Source
197
25.4k
  any_invocable_impl& operator=(any_invocable_impl&& rhs) noexcept {
198
25.4k
    any_invocable_impl{std::move(rhs)}.swap(*this);
199
25.4k
    return *this;
200
25.4k
  }
201
  any_invocable_impl& operator=(std::nullptr_t) noexcept {
202
    destroy();
203
    return *this;
204
  }
205
206
4.02M
  ~any_invocable_impl() { destroy(); }
ofats::any_detail::any_invocable_impl<void, false, us_listen_socket_t*>::~any_invocable_impl()
Line
Count
Source
206
1.72k
  ~any_invocable_impl() { destroy(); }
ofats::any_detail::any_invocable_impl<void, false, uWS::HttpResponse<false>*, uWS::HttpRequest*>::~any_invocable_impl()
Line
Count
Source
206
5.17k
  ~any_invocable_impl() { destroy(); }
ofats::any_detail::any_invocable_impl<void, false>::~any_invocable_impl()
Line
Count
Source
206
1.33M
  ~any_invocable_impl() { destroy(); }
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<void, false, uWS::Loop*>::~any_invocable_impl()
ofats::any_detail::any_invocable_impl<bool, false, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::~any_invocable_impl()
Line
Count
Source
206
3.44k
  ~any_invocable_impl() { destroy(); }
ofats::any_detail::any_invocable_impl<void, false, char const*>::~any_invocable_impl()
Line
Count
Source
206
1.72k
  ~any_invocable_impl() { destroy(); }
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<void, false, uWS::HttpResponse<false>*, int>::~any_invocable_impl()
ofats::any_detail::any_invocable_impl<void, false, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::~any_invocable_impl()
Line
Count
Source
206
1.19M
  ~any_invocable_impl() { destroy(); }
ofats::any_detail::any_invocable_impl<bool, false, unsigned long>::~any_invocable_impl()
Line
Count
Source
206
1.20M
  ~any_invocable_impl() { destroy(); }
ofats::any_detail::any_invocable_impl<void*, false, void*, uWS::HttpRequest*>::~any_invocable_impl()
Line
Count
Source
206
140k
  ~any_invocable_impl() { destroy(); }
ofats::any_detail::any_invocable_impl<void*, false, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::~any_invocable_impl()
Line
Count
Source
206
140k
  ~any_invocable_impl() { destroy(); }
207
208
80.1k
  void swap(any_invocable_impl& rhs) noexcept {
209
80.1k
    if (handle_) {
210
25.4k
      if (rhs.handle_) {
211
0
        storage tmp;
212
0
        handle_(action::move, &tmp, &storage_);
213
0
        rhs.handle_(action::move, &storage_, &rhs.storage_);
214
0
        handle_(action::move, &rhs.storage_, &tmp);
215
0
        std::swap(handle_, rhs.handle_);
216
0
        std::swap(call_, rhs.call_);
217
25.4k
      } else {
218
25.4k
        rhs.swap(*this);
219
25.4k
      }
220
54.7k
    } else if (rhs.handle_) {
221
40.0k
      rhs.handle_(action::move, &storage_, &rhs.storage_);
222
40.0k
      handle_ = rhs.handle_;
223
40.0k
      call_ = rhs.call_;
224
40.0k
      rhs.handle_ = nullptr;
225
40.0k
    }
226
80.1k
  }
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<void, false, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::swap(ofats::any_detail::any_invocable_impl<void, false, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>&)
ofats::any_detail::any_invocable_impl<bool, false, unsigned long>::swap(ofats::any_detail::any_invocable_impl<bool, false, unsigned long>&)
Line
Count
Source
208
14.6k
  void swap(any_invocable_impl& rhs) noexcept {
209
14.6k
    if (handle_) {
210
0
      if (rhs.handle_) {
211
0
        storage tmp;
212
0
        handle_(action::move, &tmp, &storage_);
213
0
        rhs.handle_(action::move, &storage_, &rhs.storage_);
214
0
        handle_(action::move, &rhs.storage_, &tmp);
215
0
        std::swap(handle_, rhs.handle_);
216
0
        std::swap(call_, rhs.call_);
217
0
      } else {
218
0
        rhs.swap(*this);
219
0
      }
220
14.6k
    } else if (rhs.handle_) {
221
0
      rhs.handle_(action::move, &storage_, &rhs.storage_);
222
0
      handle_ = rhs.handle_;
223
0
      call_ = rhs.call_;
224
0
      rhs.handle_ = nullptr;
225
0
    }
226
14.6k
  }
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<bool, false, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::swap(ofats::any_detail::any_invocable_impl<bool, false, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>&)
ofats::any_detail::any_invocable_impl<void, false>::swap(ofats::any_detail::any_invocable_impl<void, false>&)
Line
Count
Source
208
65.5k
  void swap(any_invocable_impl& rhs) noexcept {
209
65.5k
    if (handle_) {
210
25.4k
      if (rhs.handle_) {
211
0
        storage tmp;
212
0
        handle_(action::move, &tmp, &storage_);
213
0
        rhs.handle_(action::move, &storage_, &rhs.storage_);
214
0
        handle_(action::move, &rhs.storage_, &tmp);
215
0
        std::swap(handle_, rhs.handle_);
216
0
        std::swap(call_, rhs.call_);
217
25.4k
      } else {
218
25.4k
        rhs.swap(*this);
219
25.4k
      }
220
40.0k
    } else if (rhs.handle_) {
221
40.0k
      rhs.handle_(action::move, &storage_, &rhs.storage_);
222
40.0k
      handle_ = rhs.handle_;
223
40.0k
      call_ = rhs.call_;
224
40.0k
      rhs.handle_ = nullptr;
225
40.0k
    }
226
65.5k
  }
227
228
1.27M
  explicit operator bool() const noexcept { return handle_ != nullptr; }
ofats::any_detail::any_invocable_impl<void, false>::operator bool() const
Line
Count
Source
228
1.21M
  explicit operator bool() const noexcept { return handle_ != nullptr; }
ofats::any_detail::any_invocable_impl<void, false, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::operator bool() const
Line
Count
Source
228
50.8k
  explicit operator bool() const noexcept { return handle_ != nullptr; }
ofats::any_detail::any_invocable_impl<bool, false, unsigned long>::operator bool() const
Line
Count
Source
228
7.55k
  explicit operator bool() const noexcept { return handle_ != nullptr; }
ofats::any_detail::any_invocable_impl<void, false, uWS::HttpResponse<false>*, uWS::HttpRequest*>::operator bool() const
Line
Count
Source
228
1.72k
  explicit operator bool() const noexcept { return handle_ != nullptr; }
229
230
 protected:
231
  template <class F, class... Args>
232
351k
  void create(Args&&... args) {
233
351k
    using hdl = handler<F>;
234
351k
    hdl::create(storage_, std::forward<Args>(args)...);
235
351k
    handle_ = &hdl::handle;
236
351k
    call_ = &hdl::call;
237
351k
  }
void ofats::any_detail::any_invocable_impl<void*, false, void*, uWS::HttpRequest*>::create<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, uWS::HttpRequest*)#1}, {lambda(us_socket_t*, char*, int)#1}>({lambda(us_socket_t*, char*, int)#1}&&)
Line
Count
Source
232
140k
  void create(Args&&... args) {
233
140k
    using hdl = handler<F>;
234
140k
    hdl::create(storage_, std::forward<Args>(args)...);
235
140k
    handle_ = &hdl::handle;
236
140k
    call_ = &hdl::call;
237
140k
  }
void ofats::any_detail::any_invocable_impl<void*, false, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::create<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)#1}, {lambda(us_socket_t*, char*, int)#1}>({lambda(us_socket_t*, char*, int)#1}&&)
Line
Count
Source
232
140k
  void create(Args&&... args) {
233
140k
    using hdl = handler<F>;
234
140k
    hdl::create(storage_, std::forward<Args>(args)...);
235
140k
    handle_ = &hdl::handle;
236
140k
    call_ = &hdl::call;
237
140k
  }
Unexecuted instantiation: void ofats::any_detail::any_invocable_impl<bool, false, unsigned long>::create<uWS::HttpResponseData<false>::callOnWritable(unsigned long)::{lambda(unsigned long)#1}, {lambda(unsigned long)#1}>({lambda(unsigned long)#1}&&)
void ofats::any_detail::any_invocable_impl<bool, false, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::create<uWS::HttpContext<false>::onHttp(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, ofats::any_invocable<void (uWS::HttpResponse<false>*, uWS::HttpRequest*)>&&, bool)::{lambda(auto:1*)#1}, {lambda(auto:1*)#1}>({lambda(auto:1*)#1}&&)
Line
Count
Source
232
1.72k
  void create(Args&&... args) {
233
1.72k
    using hdl = handler<F>;
234
1.72k
    hdl::create(storage_, std::forward<Args>(args)...);
235
1.72k
    handle_ = &hdl::handle;
236
1.72k
    call_ = &hdl::call;
237
1.72k
  }
AsyncEpollHelloWorld.cpp:void ofats::any_detail::any_invocable_impl<void, false, uWS::HttpResponse<false>*, uWS::HttpRequest*>::create<test()::$_0, test()::$_0>(test()::$_0&&)
Line
Count
Source
232
1.72k
  void create(Args&&... args) {
233
1.72k
    using hdl = handler<F>;
234
1.72k
    hdl::create(storage_, std::forward<Args>(args)...);
235
1.72k
    handle_ = &hdl::handle;
236
1.72k
    call_ = &hdl::call;
237
1.72k
  }
AsyncEpollHelloWorld.cpp:void ofats::any_detail::any_invocable_impl<void, false>::create<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#1}, {lambda()#1}>({lambda()#1}&&)
Line
Count
Source
232
25.4k
  void create(Args&&... args) {
233
25.4k
    using hdl = handler<F>;
234
25.4k
    hdl::create(storage_, std::forward<Args>(args)...);
235
25.4k
    handle_ = &hdl::handle;
236
25.4k
    call_ = &hdl::call;
237
25.4k
  }
AsyncEpollHelloWorld.cpp:void ofats::any_detail::any_invocable_impl<void, false>::create<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}, {lambda()#2}>({lambda()#2}&&)
Line
Count
Source
232
25.4k
  void create(Args&&... args) {
233
25.4k
    using hdl = handler<F>;
234
25.4k
    hdl::create(storage_, std::forward<Args>(args)...);
235
25.4k
    handle_ = &hdl::handle;
236
25.4k
    call_ = &hdl::call;
237
25.4k
  }
AsyncEpollHelloWorld.cpp:void ofats::any_detail::any_invocable_impl<void, false>::create<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}::operator()() const::{lambda()#1}, {lambda()#2}>({lambda()#2}&&)
Line
Count
Source
232
14.6k
  void create(Args&&... args) {
233
14.6k
    using hdl = handler<F>;
234
14.6k
    hdl::create(storage_, std::forward<Args>(args)...);
235
14.6k
    handle_ = &hdl::handle;
236
14.6k
    call_ = &hdl::call;
237
14.6k
  }
AsyncEpollHelloWorld.cpp:void ofats::any_detail::any_invocable_impl<void, false, us_listen_socket_t*>::create<test()::$_1, test()::$_1>(test()::$_1&&)
Line
Count
Source
232
1.72k
  void create(Args&&... args) {
233
1.72k
    using hdl = handler<F>;
234
1.72k
    hdl::create(storage_, std::forward<Args>(args)...);
235
1.72k
    handle_ = &hdl::handle;
236
1.72k
    call_ = &hdl::call;
237
1.72k
  }
238
239
4.02M
  void destroy() noexcept {
240
4.02M
    if (handle_) {
241
351k
      handle_(action::destroy, &storage_, nullptr);
242
351k
      handle_ = nullptr;
243
351k
    }
244
4.02M
  }
ofats::any_detail::any_invocable_impl<void, false, us_listen_socket_t*>::destroy()
Line
Count
Source
239
1.72k
  void destroy() noexcept {
240
1.72k
    if (handle_) {
241
1.72k
      handle_(action::destroy, &storage_, nullptr);
242
1.72k
      handle_ = nullptr;
243
1.72k
    }
244
1.72k
  }
ofats::any_detail::any_invocable_impl<void, false, uWS::HttpResponse<false>*, uWS::HttpRequest*>::destroy()
Line
Count
Source
239
5.17k
  void destroy() noexcept {
240
5.17k
    if (handle_) {
241
1.72k
      handle_(action::destroy, &storage_, nullptr);
242
1.72k
      handle_ = nullptr;
243
1.72k
    }
244
5.17k
  }
ofats::any_detail::any_invocable_impl<void, false>::destroy()
Line
Count
Source
239
1.33M
  void destroy() noexcept {
240
1.33M
    if (handle_) {
241
65.5k
      handle_(action::destroy, &storage_, nullptr);
242
65.5k
      handle_ = nullptr;
243
65.5k
    }
244
1.33M
  }
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<void, false, uWS::Loop*>::destroy()
ofats::any_detail::any_invocable_impl<bool, false, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::destroy()
Line
Count
Source
239
3.44k
  void destroy() noexcept {
240
3.44k
    if (handle_) {
241
1.72k
      handle_(action::destroy, &storage_, nullptr);
242
1.72k
      handle_ = nullptr;
243
1.72k
    }
244
3.44k
  }
ofats::any_detail::any_invocable_impl<void, false, char const*>::destroy()
Line
Count
Source
239
1.72k
  void destroy() noexcept {
240
1.72k
    if (handle_) {
241
0
      handle_(action::destroy, &storage_, nullptr);
242
0
      handle_ = nullptr;
243
0
    }
244
1.72k
  }
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<void, false, uWS::HttpResponse<false>*, int>::destroy()
ofats::any_detail::any_invocable_impl<void, false, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::destroy()
Line
Count
Source
239
1.19M
  void destroy() noexcept {
240
1.19M
    if (handle_) {
241
0
      handle_(action::destroy, &storage_, nullptr);
242
0
      handle_ = nullptr;
243
0
    }
244
1.19M
  }
ofats::any_detail::any_invocable_impl<bool, false, unsigned long>::destroy()
Line
Count
Source
239
1.20M
  void destroy() noexcept {
240
1.20M
    if (handle_) {
241
0
      handle_(action::destroy, &storage_, nullptr);
242
0
      handle_ = nullptr;
243
0
    }
244
1.20M
  }
ofats::any_detail::any_invocable_impl<void*, false, void*, uWS::HttpRequest*>::destroy()
Line
Count
Source
239
140k
  void destroy() noexcept {
240
140k
    if (handle_) {
241
140k
      handle_(action::destroy, &storage_, nullptr);
242
140k
      handle_ = nullptr;
243
140k
    }
244
140k
  }
ofats::any_detail::any_invocable_impl<void*, false, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::destroy()
Line
Count
Source
239
140k
  void destroy() noexcept {
240
140k
    if (handle_) {
241
140k
      handle_(action::destroy, &storage_, nullptr);
242
140k
      handle_ = nullptr;
243
140k
    }
244
140k
  }
245
246
157k
  R call(ArgTypes... args) noexcept(is_noexcept) {
247
157k
    return call_(storage_, std::forward<ArgTypes>(args)...);
248
157k
  }
ofats::any_detail::any_invocable_impl<void, false>::call()
Line
Count
Source
246
50.0k
  R call(ArgTypes... args) noexcept(is_noexcept) {
247
50.0k
    return call_(storage_, std::forward<ArgTypes>(args)...);
248
50.0k
  }
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<void, false, uWS::Loop*>::call(uWS::Loop*)
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<void, false, uWS::HttpResponse<false>*, int>::call(uWS::HttpResponse<false>*, int)
ofats::any_detail::any_invocable_impl<void*, false, void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::call(void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)
Line
Count
Source
246
25.4k
  R call(ArgTypes... args) noexcept(is_noexcept) {
247
25.4k
    return call_(storage_, std::forward<ArgTypes>(args)...);
248
25.4k
  }
ofats::any_detail::any_invocable_impl<void*, false, void*, uWS::HttpRequest*>::call(void*, uWS::HttpRequest*)
Line
Count
Source
246
29.9k
  R call(ArgTypes... args) noexcept(is_noexcept) {
247
29.9k
    return call_(storage_, std::forward<ArgTypes>(args)...);
248
29.9k
  }
ofats::any_detail::any_invocable_impl<bool, false, uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*>::call(uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*)
Line
Count
Source
246
25.4k
  R call(ArgTypes... args) noexcept(is_noexcept) {
247
25.4k
    return call_(storage_, std::forward<ArgTypes>(args)...);
248
25.4k
  }
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<void, false, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool>::call(std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)
Unexecuted instantiation: ofats::any_detail::any_invocable_impl<bool, false, unsigned long>::call(unsigned long)
ofats::any_detail::any_invocable_impl<void, false, uWS::HttpResponse<false>*, uWS::HttpRequest*>::call(uWS::HttpResponse<false>*, uWS::HttpRequest*)
Line
Count
Source
246
25.4k
  R call(ArgTypes... args) noexcept(is_noexcept) {
247
25.4k
    return call_(storage_, std::forward<ArgTypes>(args)...);
248
25.4k
  }
ofats::any_detail::any_invocable_impl<void, false, us_listen_socket_t*>::call(us_listen_socket_t*)
Line
Count
Source
246
1.72k
  R call(ArgTypes... args) noexcept(is_noexcept) {
247
1.72k
    return call_(storage_, std::forward<ArgTypes>(args)...);
248
1.72k
  }
249
250
  friend bool operator==(const any_invocable_impl& f, std::nullptr_t) noexcept {
251
    return !f;
252
  }
253
  friend bool operator==(std::nullptr_t, const any_invocable_impl& f) noexcept {
254
    return !f;
255
  }
256
  friend bool operator!=(const any_invocable_impl& f, std::nullptr_t) noexcept {
257
    return static_cast<bool>(f);
258
  }
259
  friend bool operator!=(std::nullptr_t, const any_invocable_impl& f) noexcept {
260
    return static_cast<bool>(f);
261
  }
262
263
  friend void swap(any_invocable_impl& lhs, any_invocable_impl& rhs) noexcept {
264
    lhs.swap(rhs);
265
  }
266
267
 private:
268
  storage storage_;
269
  handle_func handle_ = nullptr;
270
  call_func call_;
271
};
272
273
template <class T>
274
using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>;
275
276
template <class AI, class F, bool noex, class R, class FCall, class... ArgTypes>
277
using can_convert = std::conjunction<
278
    std::negation<std::is_same<remove_cvref_t<F>, AI>>,
279
    std::negation<any_detail::is_in_place_type<remove_cvref_t<F>>>,
280
    std::is_invocable_r<R, FCall, ArgTypes...>,
281
    std::bool_constant<(!noex ||
282
                        std::is_nothrow_invocable_r_v<R, FCall, ArgTypes...>)>,
283
    std::is_constructible<std::decay_t<F>, F>>;
284
285
}  // namespace any_detail
286
287
template <class Signature>
288
class any_invocable;
289
290
#define __OFATS_ANY_INVOCABLE(cv, ref, noex, inv_quals)                        \
291
  template <class R, class... ArgTypes>                                        \
292
  class any_invocable<R(ArgTypes...) cv ref noexcept(noex)>                    \
293
      : public any_detail::any_invocable_impl<R, noex, ArgTypes...> {          \
294
    using base_type = any_detail::any_invocable_impl<R, noex, ArgTypes...>;    \
295
                                                                               \
296
   public:                                                                     \
297
    using base_type::base_type;                                                \
298
                                                                               \
299
    template <                                                                 \
300
        class F,                                                               \
301
        class = std::enable_if_t<any_detail::can_convert<                      \
302
            any_invocable, F, noex, R, F inv_quals, ArgTypes...>::value>>      \
303
351k
    any_invocable(F&& f) {                                                     \
304
351k
      base_type::template create<std::decay_t<F>>(std::forward<F>(f));         \
305
351k
    }                                                                          \
ofats::any_invocable<void* (void*, uWS::HttpRequest*)>::any_invocable<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, uWS::HttpRequest*)#1}, void>(uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, uWS::HttpRequest*)#1}&&)
Line
Count
Source
303
140k
    any_invocable(F&& f) {                                                     \
304
140k
      base_type::template create<std::decay_t<F>>(std::forward<F>(f));         \
305
140k
    }                                                                          \
ofats::any_invocable<void* (void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)>::any_invocable<uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)#1}, void>(uWS::HttpContext<false>::init()::{lambda(us_socket_t*, char*, int)#1}::operator()(us_socket_t*, char*, int) const::{lambda(void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)#1}&&)
Line
Count
Source
303
140k
    any_invocable(F&& f) {                                                     \
304
140k
      base_type::template create<std::decay_t<F>>(std::forward<F>(f));         \
305
140k
    }                                                                          \
Unexecuted instantiation: ofats::any_invocable<bool (unsigned long)>::any_invocable<uWS::HttpResponseData<false>::callOnWritable(unsigned long)::{lambda(unsigned long)#1}, void>(uWS::HttpResponseData<false>::callOnWritable(unsigned long)::{lambda(unsigned long)#1}&&)
ofats::any_invocable<bool (uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*)>::any_invocable<uWS::HttpContext<false>::onHttp(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, ofats::any_invocable<void (uWS::HttpResponse<false>*, uWS::HttpRequest*)>&&, bool)::{lambda(auto:1*)#1}, void>(uWS::HttpContext<false>::onHttp(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, ofats::any_invocable<void (uWS::HttpResponse<false>*, uWS::HttpRequest*)>&&, bool)::{lambda(auto:1*)#1}&&)
Line
Count
Source
303
1.72k
    any_invocable(F&& f) {                                                     \
304
1.72k
      base_type::template create<std::decay_t<F>>(std::forward<F>(f));         \
305
1.72k
    }                                                                          \
AsyncEpollHelloWorld.cpp:ofats::any_invocable<void (uWS::HttpResponse<false>*, uWS::HttpRequest*)>::any_invocable<test()::$_0, void>(test()::$_0&&)
Line
Count
Source
303
1.72k
    any_invocable(F&& f) {                                                     \
304
1.72k
      base_type::template create<std::decay_t<F>>(std::forward<F>(f));         \
305
1.72k
    }                                                                          \
AsyncEpollHelloWorld.cpp:ofats::any_invocable<void ()>::any_invocable<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#1}, void>(test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#1}&&)
Line
Count
Source
303
25.4k
    any_invocable(F&& f) {                                                     \
304
25.4k
      base_type::template create<std::decay_t<F>>(std::forward<F>(f));         \
305
25.4k
    }                                                                          \
AsyncEpollHelloWorld.cpp:ofats::any_invocable<void ()>::any_invocable<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}, void>(test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}&&)
Line
Count
Source
303
25.4k
    any_invocable(F&& f) {                                                     \
304
25.4k
      base_type::template create<std::decay_t<F>>(std::forward<F>(f));         \
305
25.4k
    }                                                                          \
AsyncEpollHelloWorld.cpp:ofats::any_invocable<void ()>::any_invocable<test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}::operator()() const::{lambda()#1}, void>(test()::$_0::operator()<uWS::HttpResponse<false>, uWS::HttpRequest>(uWS::HttpResponse<false>*, uWS::HttpRequest*) const::{lambda()#2}::operator()() const::{lambda()#1}&&)
Line
Count
Source
303
14.6k
    any_invocable(F&& f) {                                                     \
304
14.6k
      base_type::template create<std::decay_t<F>>(std::forward<F>(f));         \
305
14.6k
    }                                                                          \
AsyncEpollHelloWorld.cpp:ofats::any_invocable<void (us_listen_socket_t*)>::any_invocable<test()::$_1, void>(test()::$_1&&)
Line
Count
Source
303
1.72k
    any_invocable(F&& f) {                                                     \
304
1.72k
      base_type::template create<std::decay_t<F>>(std::forward<F>(f));         \
305
1.72k
    }                                                                          \
306
                                                                               \
307
    template <class T, class... Args, class VT = std::decay_t<T>,              \
308
              class = std::enable_if_t<                                        \
309
                  std::is_move_constructible_v<VT> &&                          \
310
                  std::is_constructible_v<VT, Args...> &&                      \
311
                  std::is_invocable_r_v<R, VT inv_quals, ArgTypes...> &&       \
312
                  (!noex || std::is_nothrow_invocable_r_v<R, VT inv_quals,     \
313
                                                          ArgTypes...>)>>      \
314
    explicit any_invocable(std::in_place_type_t<T>, Args&&... args) {          \
315
      base_type::template create<VT>(std::forward<Args>(args)...);             \
316
    }                                                                          \
317
                                                                               \
318
    template <                                                                 \
319
        class T, class U, class... Args, class VT = std::decay_t<T>,           \
320
        class = std::enable_if_t<                                              \
321
            std::is_move_constructible_v<VT> &&                                \
322
            std::is_constructible_v<VT, std::initializer_list<U>&, Args...> && \
323
            std::is_invocable_r_v<R, VT inv_quals, ArgTypes...> &&             \
324
            (!noex ||                                                          \
325
             std::is_nothrow_invocable_r_v<R, VT inv_quals, ArgTypes...>)>>    \
326
    explicit any_invocable(std::in_place_type_t<T>,                            \
327
                           std::initializer_list<U> il, Args&&... args) {      \
328
      base_type::template create<VT>(il, std::forward<Args>(args)...);         \
329
    }                                                                          \
330
                                                                               \
331
    template <class F, class FDec = std::decay_t<F>>                           \
332
    std::enable_if_t<!std::is_same_v<FDec, any_invocable> &&                   \
333
                         std::is_move_constructible_v<FDec>,                   \
334
                     any_invocable&>                                           \
335
29.3k
    operator=(F&& f) {                                                         \
336
29.3k
      any_invocable{std::forward<F>(f)}.swap(*this);                           \
337
29.3k
      return *this;                                                            \
338
29.3k
    }                                                                          \
Unexecuted instantiation: _ZN5ofats13any_invocableIFvNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEbEEaSIDnDnEENS1_9enable_ifIXaantsr3stdE9is_same_vIT0_S7_Esr3stdE23is_move_constructible_vISA_EERS7_E4typeEOT_
Unexecuted instantiation: _ZN5ofats13any_invocableIFbmEEaSIZN3uWS16HttpResponseDataILb0EE14callOnWritableEmEUlmE_S7_EENSt3__19enable_ifIXaantsr3stdE9is_same_vIT0_S2_Esr3stdE23is_move_constructible_vISA_EERS2_E4typeEOT_
_ZN5ofats13any_invocableIFvvEEaSIDnDnEENSt3__19enable_ifIXaantsr3stdE9is_same_vIT0_S2_Esr3stdE23is_move_constructible_vIS6_EERS2_E4typeEOT_
Line
Count
Source
335
14.6k
    operator=(F&& f) {                                                         \
336
14.6k
      any_invocable{std::forward<F>(f)}.swap(*this);                           \
337
14.6k
      return *this;                                                            \
338
14.6k
    }                                                                          \
_ZN5ofats13any_invocableIFbmEEaSIDnDnEENSt3__19enable_ifIXaantsr3stdE9is_same_vIT0_S2_Esr3stdE23is_move_constructible_vIS6_EERS2_E4typeEOT_
Line
Count
Source
335
14.6k
    operator=(F&& f) {                                                         \
336
14.6k
      any_invocable{std::forward<F>(f)}.swap(*this);                           \
337
14.6k
      return *this;                                                            \
338
14.6k
    }                                                                          \
339
    template <class F>                                                         \
340
    any_invocable& operator=(std::reference_wrapper<F> f) {                    \
341
      any_invocable{f}.swap(*this);                                            \
342
      return *this;                                                            \
343
    }                                                                          \
344
                                                                               \
345
157k
    R operator()(ArgTypes... args) cv ref noexcept(noex) {                     \
346
157k
      return base_type::call(std::forward<ArgTypes>(args)...);                 \
347
157k
    }                                                                          \
ofats::any_invocable<void ()>::operator()()
Line
Count
Source
345
50.0k
    R operator()(ArgTypes... args) cv ref noexcept(noex) {                     \
346
50.0k
      return base_type::call(std::forward<ArgTypes>(args)...);                 \
347
50.0k
    }                                                                          \
Unexecuted instantiation: ofats::any_invocable<void (uWS::Loop*)>::operator()(uWS::Loop*)
Unexecuted instantiation: ofats::any_invocable<void (uWS::HttpResponse<false>*, int)>::operator()(uWS::HttpResponse<false>*, int)
ofats::any_invocable<void* (void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)>::operator()(void*, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)
Line
Count
Source
345
25.4k
    R operator()(ArgTypes... args) cv ref noexcept(noex) {                     \
346
25.4k
      return base_type::call(std::forward<ArgTypes>(args)...);                 \
347
25.4k
    }                                                                          \
ofats::any_invocable<void* (void*, uWS::HttpRequest*)>::operator()(void*, uWS::HttpRequest*)
Line
Count
Source
345
29.9k
    R operator()(ArgTypes... args) cv ref noexcept(noex) {                     \
346
29.9k
      return base_type::call(std::forward<ArgTypes>(args)...);                 \
347
29.9k
    }                                                                          \
ofats::any_invocable<bool (uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*)>::operator()(uWS::HttpRouter<uWS::HttpContextData<false>::RouterData>*)
Line
Count
Source
345
25.4k
    R operator()(ArgTypes... args) cv ref noexcept(noex) {                     \
346
25.4k
      return base_type::call(std::forward<ArgTypes>(args)...);                 \
347
25.4k
    }                                                                          \
Unexecuted instantiation: ofats::any_invocable<void (std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)>::operator()(std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool)
Unexecuted instantiation: ofats::any_invocable<bool (unsigned long)>::operator()(unsigned long)
ofats::any_invocable<void (uWS::HttpResponse<false>*, uWS::HttpRequest*)>::operator()(uWS::HttpResponse<false>*, uWS::HttpRequest*)
Line
Count
Source
345
25.4k
    R operator()(ArgTypes... args) cv ref noexcept(noex) {                     \
346
25.4k
      return base_type::call(std::forward<ArgTypes>(args)...);                 \
347
25.4k
    }                                                                          \
ofats::any_invocable<void (us_listen_socket_t*)>::operator()(us_listen_socket_t*)
Line
Count
Source
345
1.72k
    R operator()(ArgTypes... args) cv ref noexcept(noex) {                     \
346
1.72k
      return base_type::call(std::forward<ArgTypes>(args)...);                 \
347
1.72k
    }                                                                          \
348
  };
349
350
// cv -> {`empty`, const}
351
// ref -> {`empty`, &, &&}
352
// noex -> {true, false}
353
// inv_quals -> (is_empty(ref) ? & : ref)
354
__OFATS_ANY_INVOCABLE(, , false, &)               // 000
355
__OFATS_ANY_INVOCABLE(, , true, &)                // 001
356
__OFATS_ANY_INVOCABLE(, &, false, &)              // 010
357
__OFATS_ANY_INVOCABLE(, &, true, &)               // 011
358
__OFATS_ANY_INVOCABLE(, &&, false, &&)            // 020
359
__OFATS_ANY_INVOCABLE(, &&, true, &&)             // 021
360
__OFATS_ANY_INVOCABLE(const, , false, const&)     // 100
361
__OFATS_ANY_INVOCABLE(const, , true, const&)      // 101
362
__OFATS_ANY_INVOCABLE(const, &, false, const&)    // 110
363
__OFATS_ANY_INVOCABLE(const, &, true, const&)     // 111
364
__OFATS_ANY_INVOCABLE(const, &&, false, const&&)  // 120
365
__OFATS_ANY_INVOCABLE(const, &&, true, const&&)   // 121
366
367
#undef __OFATS_ANY_INVOCABLE
368
369
}  // namespace ofats
370
371
/* We, uWebSockets define our own type */
372
namespace uWS {
373
  template <class T>
374
  using MoveOnlyFunction = ofats::any_invocable<T>;
375
}
376
377
#endif  // _ANY_INVOKABLE_H_