/src/simdutf/fuzz/helpers/nameof.hpp
Line | Count | Source (jump to first uncovered line) |
1 | | // _ _ __ _____ |
2 | | // | \ | | / _| / ____|_ _ |
3 | | // | \| | __ _ _ __ ___ ___ ___ | |_ | | _| |_ _| |_ |
4 | | // | . ` |/ _` | '_ ` _ \ / _ \/ _ \| _| | | |_ _|_ _| |
5 | | // | |\ | (_| | | | | | | __/ (_) | | | |____|_| |_| |
6 | | // |_| \_|\__,_|_| |_| |_|\___|\___/|_| \_____| |
7 | | // https://github.com/Neargye/nameof |
8 | | // version 0.10.4 |
9 | | // |
10 | | // Licensed under the MIT License <http://opensource.org/licenses/MIT>. |
11 | | // SPDX-License-Identifier: MIT |
12 | | // Copyright (c) 2016 - 2024 Daniil Goncharov <neargye@gmail.com>. |
13 | | // |
14 | | // Permission is hereby granted, free of charge, to any person obtaining a copy |
15 | | // of this software and associated documentation files (the "Software"), to deal |
16 | | // in the Software without restriction, including without limitation the rights |
17 | | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
18 | | // copies of the Software, and to permit persons to whom the Software is |
19 | | // furnished to do so, subject to the following conditions: |
20 | | // |
21 | | // The above copyright notice and this permission notice shall be included in all |
22 | | // copies or substantial portions of the Software. |
23 | | // |
24 | | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
25 | | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
26 | | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
27 | | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
28 | | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
29 | | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
30 | | // SOFTWARE. |
31 | | |
32 | | #ifndef NEARGYE_NAMEOF_HPP |
33 | | #define NEARGYE_NAMEOF_HPP |
34 | | |
35 | | #define NAMEOF_VERSION_MAJOR 0 |
36 | | #define NAMEOF_VERSION_MINOR 10 |
37 | | #define NAMEOF_VERSION_PATCH 4 |
38 | | |
39 | | #include <array> |
40 | | #include <cassert> |
41 | | #include <cstdint> |
42 | | #include <cstddef> |
43 | | #include <iosfwd> |
44 | | #include <iterator> |
45 | | #include <limits> |
46 | | #include <type_traits> |
47 | | #include <utility> |
48 | | |
49 | | #if !defined(NAMEOF_USING_ALIAS_STRING) |
50 | | # include <string> |
51 | | #endif |
52 | | #if !defined(NAMEOF_USING_ALIAS_STRING_VIEW) |
53 | | # include <string_view> |
54 | | #endif |
55 | | |
56 | | #if __has_include(<cxxabi.h>) |
57 | | # include <cxxabi.h> |
58 | | # include <cstdlib> |
59 | | #endif |
60 | | |
61 | | #if defined(__clang__) |
62 | | # pragma clang diagnostic push |
63 | | # pragma clang diagnostic ignored "-Wunknown-warning-option" |
64 | | # pragma clang diagnostic ignored "-Wenum-constexpr-conversion" |
65 | | #elif defined(__GNUC__) |
66 | | # pragma GCC diagnostic push |
67 | | # pragma GCC diagnostic ignored "-Wstringop-overflow" // Missing terminating nul 'enum_name_v'. |
68 | | #elif defined(_MSC_VER) |
69 | | # pragma warning(push) |
70 | | # pragma warning(disable : 26495) // Variable 'cstring<N>::chars_' is uninitialized. |
71 | | # pragma warning(disable : 28020) // Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. |
72 | | # pragma warning(disable : 26451) // The expression '0<=_Param_(1)&&_Param_(1)<=1-1' is not true at this call. |
73 | | # pragma warning(disable : 4514) // Unreferenced inline function has been removed. |
74 | | #endif |
75 | | |
76 | | // Checks nameof_type compiler compatibility. |
77 | | #if defined(__clang__) && __clang_major__ >= 5 || defined(__GNUC__) && __GNUC__ >= 7 || defined(_MSC_VER) && _MSC_VER >= 1910 |
78 | | # undef NAMEOF_TYPE_SUPPORTED |
79 | | # define NAMEOF_TYPE_SUPPORTED 1 |
80 | | #endif |
81 | | |
82 | | // Checks nameof_type_rtti compiler compatibility. |
83 | | #if defined(__clang__) |
84 | | # if __has_feature(cxx_rtti) |
85 | | # undef NAMEOF_TYPE_RTTI_SUPPORTED |
86 | | # define NAMEOF_TYPE_RTTI_SUPPORTED 1 |
87 | | # endif |
88 | | #elif defined(__GNUC__) |
89 | | # if defined(__GXX_RTTI) |
90 | | # undef NAMEOF_TYPE_RTTI_SUPPORTED |
91 | | # define NAMEOF_TYPE_RTTI_SUPPORTED 1 |
92 | | # endif |
93 | | #elif defined(_MSC_VER) |
94 | | # if defined(_CPPRTTI) |
95 | | # undef NAMEOF_TYPE_RTTI_SUPPORTED |
96 | | # define NAMEOF_TYPE_RTTI_SUPPORTED 1 |
97 | | # endif |
98 | | #endif |
99 | | |
100 | | // Checks nameof_member compiler compatibility. |
101 | | #if defined(__clang__) && __clang_major__ >= 5 || defined(__GNUC__) && __GNUC__ >= 7 || defined(_MSC_VER) && defined(_MSVC_LANG) && _MSVC_LANG >= 202002L |
102 | | # undef NAMEOF_MEMBER_SUPPORTED |
103 | | # define NAMEOF_MEMBER_SUPPORTED 1 |
104 | | #endif |
105 | | |
106 | | // Checks nameof_pointer compiler compatibility. |
107 | | #if defined(__clang__) && __clang_major__ >= 5 || defined(__GNUC__) && __GNUC__ >= 7 || defined(_MSC_VER) && defined(_MSVC_LANG) && _MSVC_LANG >= 202002L |
108 | | # undef NAMEOF_POINTER_SUPPORTED |
109 | | # define NAMEOF_POINTER_SUPPORTED 1 |
110 | | #endif |
111 | | |
112 | | // Checks nameof_enum compiler compatibility. |
113 | | #if defined(__clang__) && __clang_major__ >= 5 || defined(__GNUC__) && __GNUC__ >= 9 || defined(_MSC_VER) && _MSC_VER >= 1910 |
114 | | # undef NAMEOF_ENUM_SUPPORTED |
115 | | # define NAMEOF_ENUM_SUPPORTED 1 |
116 | | #endif |
117 | | |
118 | | // Checks nameof_enum compiler aliases compatibility. |
119 | | #if defined(__clang__) && __clang_major__ >= 5 || defined(__GNUC__) && __GNUC__ >= 9 || defined(_MSC_VER) && _MSC_VER >= 1920 |
120 | | # undef NAMEOF_ENUM_SUPPORTED_ALIASES |
121 | | # define NAMEOF_ENUM_SUPPORTED_ALIASES 1 |
122 | | #endif |
123 | | |
124 | | // Enum value must be greater or equals than NAMEOF_ENUM_RANGE_MIN. By default NAMEOF_ENUM_RANGE_MIN = -128. |
125 | | // If need another min range for all enum types by default, redefine the macro NAMEOF_ENUM_RANGE_MIN. |
126 | | #if !defined(NAMEOF_ENUM_RANGE_MIN) |
127 | | # define NAMEOF_ENUM_RANGE_MIN -128 |
128 | | #endif |
129 | | |
130 | | // Enum value must be less or equals than NAMEOF_ENUM_RANGE_MAX. By default NAMEOF_ENUM_RANGE_MAX = 128. |
131 | | // If need another max range for all enum types by default, redefine the macro NAMEOF_ENUM_RANGE_MAX. |
132 | | #if !defined(NAMEOF_ENUM_RANGE_MAX) |
133 | | # define NAMEOF_ENUM_RANGE_MAX 128 |
134 | | #endif |
135 | | |
136 | | namespace nameof { |
137 | | |
138 | | // If need another string_view type, define the macro NAMEOF_USING_ALIAS_STRING_VIEW. |
139 | | #if defined(NAMEOF_USING_ALIAS_STRING_VIEW) |
140 | | NAMEOF_USING_ALIAS_STRING_VIEW |
141 | | #else |
142 | | using std::string_view; |
143 | | #endif |
144 | | |
145 | | // If need another string type, define the macro NAMEOF_USING_ALIAS_STRING. |
146 | | #if defined(NAMEOF_USING_ALIAS_STRING) |
147 | | NAMEOF_USING_ALIAS_STRING |
148 | | #else |
149 | | using std::string; |
150 | | #endif |
151 | | |
152 | | namespace customize { |
153 | | |
154 | | // Enum value must be in range [NAMEOF_ENUM_RANGE_MIN, NAMEOF_ENUM_RANGE_MAX]. By default NAMEOF_ENUM_RANGE_MIN = -128, NAMEOF_ENUM_RANGE_MAX = 128. |
155 | | // If you need another range for all enum types by default, redefine the macro NAMEOF_ENUM_RANGE_MIN and NAMEOF_ENUM_RANGE_MAX. |
156 | | // If you need another range for specific enum type, add specialization enum_range for necessary enum type. |
157 | | template <typename E> |
158 | | struct enum_range { |
159 | | static_assert(std::is_enum_v<E>, "nameof::customize::enum_range requires enum type."); |
160 | | inline static constexpr int min = NAMEOF_ENUM_RANGE_MIN; |
161 | | inline static constexpr int max = NAMEOF_ENUM_RANGE_MAX; |
162 | | static_assert(max > min, "nameof::customize::enum_range requires max > min."); |
163 | | }; |
164 | | |
165 | | static_assert(NAMEOF_ENUM_RANGE_MIN <= 0, "NAMEOF_ENUM_RANGE_MIN must be less or equals than 0."); |
166 | | static_assert(NAMEOF_ENUM_RANGE_MIN > (std::numeric_limits<std::int16_t>::min)(), "NAMEOF_ENUM_RANGE_MIN must be greater than INT16_MIN."); |
167 | | |
168 | | static_assert(NAMEOF_ENUM_RANGE_MAX > 0, "NAMEOF_ENUM_RANGE_MAX must be greater than 0."); |
169 | | static_assert(NAMEOF_ENUM_RANGE_MAX < (std::numeric_limits<std::int16_t>::max)(), "NAMEOF_ENUM_RANGE_MAX must be less than INT16_MAX."); |
170 | | |
171 | | static_assert(NAMEOF_ENUM_RANGE_MAX > NAMEOF_ENUM_RANGE_MIN, "NAMEOF_ENUM_RANGE_MAX must be greater than NAMEOF_ENUM_RANGE_MIN."); |
172 | | |
173 | | // If you need custom names for enum, add specialization enum_name for necessary enum type. |
174 | | template <typename E> |
175 | 0 | constexpr string_view enum_name(E) noexcept { |
176 | 0 | static_assert(std::is_enum_v<E>, "nameof::customize::enum_name requires enum type."); |
177 | 0 | return {}; |
178 | 0 | } |
179 | | |
180 | | // If you need custom name for type, add specialization type_name for necessary type. |
181 | | template <typename T> |
182 | | constexpr string_view type_name() noexcept { |
183 | | return {}; |
184 | | } |
185 | | |
186 | | // If you need custom name for member, add specialization member_name for necessary type. |
187 | | template <auto V> |
188 | | constexpr string_view member_name() noexcept { |
189 | | return {}; |
190 | | } |
191 | | |
192 | | // If you need custom name for a pointer, add specialization pointer_name for necessary type. |
193 | | template <auto V> |
194 | | constexpr string_view pointer_name() noexcept { |
195 | | return {}; |
196 | | } |
197 | | |
198 | | } // namespace nameof::customize |
199 | | |
200 | | template <std::uint16_t N> |
201 | | class [[nodiscard]] cstring { |
202 | | public: |
203 | | using value_type = const char; |
204 | | using size_type = std::uint16_t; |
205 | | using difference_type = std::ptrdiff_t; |
206 | | using pointer = const char*; |
207 | | using const_pointer = const char*; |
208 | | using reference = const char&; |
209 | | using const_reference = const char&; |
210 | | |
211 | | using iterator = const char*; |
212 | | using const_iterator = const char*; |
213 | | |
214 | | using reverse_iterator = std::reverse_iterator<iterator>; |
215 | | using const_reverse_iterator = std::reverse_iterator<const_iterator>; |
216 | | |
217 | | constexpr explicit cstring(string_view str) noexcept : cstring{str, std::make_integer_sequence<std::uint16_t, N>{}} { |
218 | | assert(str.size() > 0 && str.size() == N); |
219 | | } |
220 | | |
221 | | constexpr cstring() = delete; |
222 | | |
223 | | constexpr cstring(const cstring&) = default; |
224 | | |
225 | | constexpr cstring(cstring&&) = default; |
226 | | |
227 | | ~cstring() = default; |
228 | | |
229 | | cstring& operator=(const cstring&) = default; |
230 | | |
231 | | cstring& operator=(cstring&&) = default; |
232 | | |
233 | 18.1k | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } Unexecuted instantiation: nameof::cstring<(unsigned short)7>::data() const Unexecuted instantiation: nameof::cstring<(unsigned short)11>::data() const Unexecuted instantiation: nameof::cstring<(unsigned short)9>::data() const Unexecuted instantiation: nameof::cstring<(unsigned short)8>::data() const Unexecuted instantiation: nameof::cstring<(unsigned short)17>::data() const Unexecuted instantiation: nameof::cstring<(unsigned short)5>::data() const nameof::cstring<(unsigned short)28>::data() const Line | Count | Source | 233 | 4 | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)26>::data() const Line | Count | Source | 233 | 2 | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)25>::data() const Line | Count | Source | 233 | 1.01k | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)30>::data() const Line | Count | Source | 233 | 309 | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)24>::data() const Line | Count | Source | 233 | 2.95k | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)29>::data() const Line | Count | Source | 233 | 850 | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)23>::data() const Line | Count | Source | 233 | 3.33k | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)22>::data() const Line | Count | Source | 233 | 4.54k | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)27>::data() const Line | Count | Source | 233 | 356 | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)21>::data() const Line | Count | Source | 233 | 854 | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)37>::data() const Line | Count | Source | 233 | 238 | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)36>::data() const Line | Count | Source | 233 | 972 | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)35>::data() const Line | Count | Source | 233 | 1.59k | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)33>::data() const Line | Count | Source | 233 | 843 | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
nameof::cstring<(unsigned short)34>::data() const Line | Count | Source | 233 | 300 | [[nodiscard]] constexpr const_pointer data() const noexcept { return chars_; } |
Unexecuted instantiation: nameof::cstring<(unsigned short)16>::data() const Unexecuted instantiation: nameof::cstring<(unsigned short)14>::data() const Unexecuted instantiation: nameof::cstring<(unsigned short)13>::data() const |
234 | | |
235 | 18.1k | [[nodiscard]] constexpr size_type size() const noexcept { return N; } Unexecuted instantiation: nameof::cstring<(unsigned short)7>::size() const Unexecuted instantiation: nameof::cstring<(unsigned short)11>::size() const Unexecuted instantiation: nameof::cstring<(unsigned short)9>::size() const Unexecuted instantiation: nameof::cstring<(unsigned short)8>::size() const Unexecuted instantiation: nameof::cstring<(unsigned short)17>::size() const Unexecuted instantiation: nameof::cstring<(unsigned short)5>::size() const nameof::cstring<(unsigned short)28>::size() const Line | Count | Source | 235 | 4 | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)26>::size() const Line | Count | Source | 235 | 2 | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)25>::size() const Line | Count | Source | 235 | 1.01k | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)30>::size() const Line | Count | Source | 235 | 309 | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)24>::size() const Line | Count | Source | 235 | 2.95k | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)29>::size() const Line | Count | Source | 235 | 850 | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)23>::size() const Line | Count | Source | 235 | 3.33k | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)22>::size() const Line | Count | Source | 235 | 4.54k | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)27>::size() const Line | Count | Source | 235 | 356 | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)21>::size() const Line | Count | Source | 235 | 854 | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)37>::size() const Line | Count | Source | 235 | 238 | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)36>::size() const Line | Count | Source | 235 | 972 | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)35>::size() const Line | Count | Source | 235 | 1.59k | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)33>::size() const Line | Count | Source | 235 | 843 | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
nameof::cstring<(unsigned short)34>::size() const Line | Count | Source | 235 | 300 | [[nodiscard]] constexpr size_type size() const noexcept { return N; } |
Unexecuted instantiation: nameof::cstring<(unsigned short)16>::size() const Unexecuted instantiation: nameof::cstring<(unsigned short)14>::size() const Unexecuted instantiation: nameof::cstring<(unsigned short)13>::size() const |
236 | | |
237 | | [[nodiscard]] constexpr const_iterator begin() const noexcept { return data(); } |
238 | | |
239 | | [[nodiscard]] constexpr const_iterator end() const noexcept { return data() + size(); } |
240 | | |
241 | | [[nodiscard]] constexpr const_iterator cbegin() const noexcept { return begin(); } |
242 | | |
243 | | [[nodiscard]] constexpr const_iterator cend() const noexcept { return end(); } |
244 | | |
245 | | [[nodiscard]] constexpr const_reverse_iterator rbegin() const noexcept { return end(); } |
246 | | |
247 | | [[nodiscard]] constexpr const_reverse_iterator rend() const noexcept { return begin(); } |
248 | | |
249 | | [[nodiscard]] constexpr const_reverse_iterator crbegin() const noexcept { return rbegin(); } |
250 | | |
251 | | [[nodiscard]] constexpr const_reverse_iterator crend() const noexcept { return rend(); } |
252 | | |
253 | | [[nodiscard]] constexpr const_reference operator[](size_type i) const noexcept { return assert(i < size()), chars_[i]; } |
254 | | |
255 | | [[nodiscard]] constexpr const_reference front() const noexcept { return chars_[0]; } |
256 | | |
257 | | [[nodiscard]] constexpr const_reference back() const noexcept { return chars_[N]; } |
258 | | |
259 | | [[nodiscard]] constexpr size_type length() const noexcept { return size(); } |
260 | | |
261 | | [[nodiscard]] constexpr bool empty() const noexcept { return false; } |
262 | | |
263 | | [[nodiscard]] constexpr int compare(string_view str) const noexcept { return string_view{data(), size()}.compare(str); } |
264 | | |
265 | | [[nodiscard]] constexpr const char* c_str() const noexcept { return data(); } |
266 | | |
267 | | [[nodiscard]] string str() const { return {begin(), end()}; } |
268 | | |
269 | 18.1k | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } Unexecuted instantiation: nameof::cstring<(unsigned short)7>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Unexecuted instantiation: nameof::cstring<(unsigned short)11>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Unexecuted instantiation: nameof::cstring<(unsigned short)9>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Unexecuted instantiation: nameof::cstring<(unsigned short)8>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Unexecuted instantiation: nameof::cstring<(unsigned short)17>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Unexecuted instantiation: nameof::cstring<(unsigned short)5>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const nameof::cstring<(unsigned short)28>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 4 | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)26>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 2 | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)25>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 1.01k | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)30>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 309 | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)24>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 2.95k | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)29>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 850 | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)23>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 3.33k | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)22>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 4.54k | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)27>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 356 | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)21>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 854 | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)37>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 238 | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)36>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 972 | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)35>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 1.59k | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)33>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 843 | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
nameof::cstring<(unsigned short)34>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Line | Count | Source | 269 | 300 | [[nodiscard]] constexpr operator string_view() const noexcept { return {data(), size()}; } |
Unexecuted instantiation: nameof::cstring<(unsigned short)16>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Unexecuted instantiation: nameof::cstring<(unsigned short)14>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const Unexecuted instantiation: nameof::cstring<(unsigned short)13>::operator std::__1::basic_string_view<char, std::__1::char_traits<char> >() const |
270 | | |
271 | | [[nodiscard]] constexpr explicit operator const_pointer() const noexcept { return data(); } |
272 | | |
273 | | [[nodiscard]] explicit operator string() const { return {begin(), end()}; } |
274 | | |
275 | | private: |
276 | | template <std::uint16_t... I> |
277 | | constexpr cstring(string_view str, std::integer_sequence<std::uint16_t, I...>) noexcept : chars_{str[I]..., '\0'} {} |
278 | | |
279 | | char chars_[static_cast<std::size_t>(N) + 1]; |
280 | | }; |
281 | | |
282 | | template <> |
283 | | class [[nodiscard]] cstring<0> { |
284 | | public: |
285 | | using value_type = const char; |
286 | | using size_type = std::uint16_t; |
287 | | using difference_type = std::ptrdiff_t; |
288 | | using pointer = const char*; |
289 | | using const_pointer = const char*; |
290 | | using reference = const char&; |
291 | | using const_reference = const char&; |
292 | | |
293 | | using iterator = const char*; |
294 | | using const_iterator = const char*; |
295 | | |
296 | | using reverse_iterator = std::reverse_iterator<iterator>; |
297 | | using const_reverse_iterator = std::reverse_iterator<const_iterator>; |
298 | | |
299 | 0 | constexpr explicit cstring(string_view) noexcept {} |
300 | | |
301 | | constexpr cstring() = default; |
302 | | |
303 | | constexpr cstring(const cstring&) = default; |
304 | | |
305 | | constexpr cstring(cstring&&) = default; |
306 | | |
307 | | ~cstring() = default; |
308 | | |
309 | | cstring& operator=(const cstring&) = default; |
310 | | |
311 | | cstring& operator=(cstring&&) = default; |
312 | | |
313 | 0 | [[nodiscard]] constexpr const_pointer data() const noexcept { return nullptr; } |
314 | | |
315 | 0 | [[nodiscard]] constexpr size_type size() const noexcept { return 0; } |
316 | | |
317 | 0 | [[nodiscard]] constexpr const_iterator begin() const noexcept { return nullptr; } |
318 | | |
319 | 0 | [[nodiscard]] constexpr const_iterator end() const noexcept { return nullptr; } |
320 | | |
321 | 0 | [[nodiscard]] constexpr const_iterator cbegin() const noexcept { return nullptr; } |
322 | | |
323 | 0 | [[nodiscard]] constexpr const_iterator cend() const noexcept { return nullptr; } |
324 | | |
325 | 0 | [[nodiscard]] constexpr const_reverse_iterator rbegin() const noexcept { return {}; } |
326 | | |
327 | 0 | [[nodiscard]] constexpr const_reverse_iterator rend() const noexcept { return {}; } |
328 | | |
329 | 0 | [[nodiscard]] constexpr const_reverse_iterator crbegin() const noexcept { return {}; } |
330 | | |
331 | 0 | [[nodiscard]] constexpr const_reverse_iterator crend() const noexcept { return {}; } |
332 | | |
333 | 0 | [[nodiscard]] constexpr size_type length() const noexcept { return 0; } |
334 | | |
335 | 0 | [[nodiscard]] constexpr bool empty() const noexcept { return true; } |
336 | | |
337 | 0 | [[nodiscard]] constexpr int compare(string_view str) const noexcept { return string_view{}.compare(str); } |
338 | | |
339 | 0 | [[nodiscard]] constexpr const char* c_str() const noexcept { return nullptr; } |
340 | | |
341 | 0 | [[nodiscard]] string str() const { return {}; } |
342 | | |
343 | 0 | [[nodiscard]] constexpr operator string_view() const noexcept { return {}; } |
344 | | |
345 | 0 | [[nodiscard]] constexpr explicit operator const_pointer() const noexcept { return nullptr; } |
346 | | |
347 | 0 | [[nodiscard]] explicit operator string() const { return {}; } |
348 | | }; |
349 | | |
350 | | template <std::uint16_t N> |
351 | | [[nodiscard]] constexpr bool operator==(const cstring<N>& lhs, string_view rhs) noexcept { |
352 | | return lhs.compare(rhs) == 0; |
353 | | } |
354 | | |
355 | | template <std::uint16_t N> |
356 | | [[nodiscard]] constexpr bool operator==(string_view lhs, const cstring<N>& rhs) noexcept { |
357 | | return lhs.compare(rhs) == 0; |
358 | | } |
359 | | |
360 | | template <std::uint16_t N> |
361 | | [[nodiscard]] constexpr bool operator!=(const cstring<N>& lhs, string_view rhs) noexcept { |
362 | | return lhs.compare(rhs) != 0; |
363 | | } |
364 | | |
365 | | template <std::uint16_t N> |
366 | | [[nodiscard]] constexpr bool operator!=(string_view lhs, const cstring<N>& rhs) noexcept { |
367 | | return lhs.compare(rhs) != 0; |
368 | | } |
369 | | |
370 | | template <std::uint16_t N> |
371 | | [[nodiscard]] constexpr bool operator>(const cstring<N>& lhs, string_view rhs) noexcept { |
372 | | return lhs.compare(rhs) > 0; |
373 | | } |
374 | | |
375 | | template <std::uint16_t N> |
376 | | [[nodiscard]] constexpr bool operator>(string_view lhs, const cstring<N>& rhs) noexcept { |
377 | | return lhs.compare(rhs) > 0; |
378 | | } |
379 | | |
380 | | template <std::uint16_t N> |
381 | | [[nodiscard]] constexpr bool operator>=(const cstring<N>& lhs, string_view rhs) noexcept { |
382 | | return lhs.compare(rhs) >= 0; |
383 | | } |
384 | | |
385 | | template <std::uint16_t N> |
386 | | [[nodiscard]] constexpr bool operator>=(string_view lhs, const cstring<N>& rhs) noexcept { |
387 | | return lhs.compare(rhs) >= 0; |
388 | | } |
389 | | |
390 | | template <std::uint16_t N> |
391 | | [[nodiscard]] constexpr bool operator<(const cstring<N>& lhs, string_view rhs) noexcept { |
392 | | return lhs.compare(rhs) < 0; |
393 | | } |
394 | | |
395 | | template <std::uint16_t N> |
396 | | [[nodiscard]] constexpr bool operator<(string_view lhs, const cstring<N>& rhs) noexcept { |
397 | | return lhs.compare(rhs) < 0; |
398 | | } |
399 | | |
400 | | template <std::uint16_t N> |
401 | | [[nodiscard]] constexpr bool operator<=(const cstring<N>& lhs, string_view rhs) noexcept { |
402 | | return lhs.compare(rhs) <= 0; |
403 | | } |
404 | | |
405 | | template <std::uint16_t N> |
406 | | [[nodiscard]] constexpr bool operator<=(string_view lhs, const cstring<N>& rhs) noexcept { |
407 | | return lhs.compare(rhs) <= 0; |
408 | | } |
409 | | |
410 | | template <typename Char, typename Traits, std::uint16_t N> |
411 | | std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os, const cstring<N>& srt) { |
412 | | for (const auto c : srt) { |
413 | | os.put(c); |
414 | | } |
415 | | return os; |
416 | | } |
417 | | |
418 | | namespace detail { |
419 | | |
420 | 0 | constexpr string_view pretty_name(string_view name, bool remove_suffix = true) noexcept { |
421 | 0 | if (name.size() >= 1 && (name[0] == '"' || name[0] == '\'')) { |
422 | 0 | return {}; // Narrow multibyte string literal. |
423 | 0 | } else if (name.size() >= 2 && name[0] == 'R' && (name[1] == '"' || name[1] == '\'')) { |
424 | 0 | return {}; // Raw string literal. |
425 | 0 | } else if (name.size() >= 2 && name[0] == 'L' && (name[1] == '"' || name[1] == '\'')) { |
426 | 0 | return {}; // Wide string literal. |
427 | 0 | } else if (name.size() >= 2 && name[0] == 'U' && (name[1] == '"' || name[1] == '\'')) { |
428 | 0 | return {}; // UTF-32 encoded string literal. |
429 | 0 | } else if (name.size() >= 2 && name[0] == 'u' && (name[1] == '"' || name[1] == '\'')) { |
430 | 0 | return {}; // UTF-16 encoded string literal. |
431 | 0 | } else if (name.size() >= 3 && name[0] == 'u' && name[1] == '8' && (name[2] == '"' || name[2] == '\'')) { |
432 | 0 | return {}; // UTF-8 encoded string literal. |
433 | 0 | } else if (name.size() >= 1 && (name[0] >= '0' && name[0] <= '9')) { |
434 | 0 | return {}; // Invalid name. |
435 | 0 | } |
436 | 0 |
|
437 | 0 | for (std::size_t i = name.size(), h = 0, s = 0; i > 0; --i) { |
438 | 0 | if (name[i - 1] == ')') { |
439 | 0 | ++h; |
440 | 0 | ++s; |
441 | 0 | continue; |
442 | 0 | } else if (name[i - 1] == '(') { |
443 | 0 | --h; |
444 | 0 | ++s; |
445 | 0 | continue; |
446 | 0 | } |
447 | 0 |
|
448 | 0 | if (h == 0) { |
449 | 0 | name.remove_suffix(s); |
450 | 0 | break; |
451 | 0 | } else { |
452 | 0 | ++s; |
453 | 0 | continue; |
454 | 0 | } |
455 | 0 | } |
456 | 0 |
|
457 | 0 | std::size_t s = 0; |
458 | 0 | for (std::size_t i = name.size(), h = 0; i > 0; --i) { |
459 | 0 | if (name[i - 1] == '>') { |
460 | 0 | ++h; |
461 | 0 | ++s; |
462 | 0 | continue; |
463 | 0 | } else if (name[i - 1] == '<') { |
464 | 0 | --h; |
465 | 0 | ++s; |
466 | 0 | continue; |
467 | 0 | } |
468 | 0 |
|
469 | 0 | if (h == 0) { |
470 | 0 | break; |
471 | 0 | } else { |
472 | 0 | ++s; |
473 | 0 | continue; |
474 | 0 | } |
475 | 0 | } |
476 | 0 |
|
477 | 0 | for (std::size_t i = name.size() - s; i > 0; --i) { |
478 | 0 | if (!((name[i - 1] >= '0' && name[i - 1] <= '9') || |
479 | 0 | (name[i - 1] >= 'a' && name[i - 1] <= 'z') || |
480 | 0 | (name[i - 1] >= 'A' && name[i - 1] <= 'Z') || |
481 | 0 | (name[i - 1] == '_'))) { |
482 | 0 | name.remove_prefix(i); |
483 | 0 | break; |
484 | 0 | } |
485 | 0 | } |
486 | 0 | if (remove_suffix) { |
487 | 0 | name.remove_suffix(s); |
488 | 0 | } |
489 | 0 |
|
490 | 0 | if (name.size() > 0 && ((name[0] >= 'a' && name[0] <= 'z') || |
491 | 0 | (name[0] >= 'A' && name[0] <= 'Z') || |
492 | 0 | (name[0] == '_'))) { |
493 | 0 | return name; |
494 | 0 | } |
495 | 0 |
|
496 | 0 | return {}; // Invalid name. |
497 | 0 | } |
498 | | |
499 | | #if defined(__cpp_lib_array_constexpr) && __cpp_lib_array_constexpr >= 201603L |
500 | | # define NAMEOF_ARRAY_CONSTEXPR 1 |
501 | | #else |
502 | | template <typename T, std::size_t N, std::size_t... I> |
503 | | constexpr std::array<std::remove_cv_t<T>, N> to_array(T (&a)[N], std::index_sequence<I...>) noexcept { |
504 | | return {{a[I]...}}; |
505 | | } |
506 | | #endif |
507 | | |
508 | | template <typename L, typename R> |
509 | 0 | constexpr bool cmp_less(L lhs, R rhs) noexcept { |
510 | 0 | static_assert(std::is_integral_v<L> && std::is_integral_v<R>, "nameof::detail::cmp_less requires integral type."); |
511 | 0 |
|
512 | 0 | if constexpr (std::is_signed_v<L> == std::is_signed_v<R>) { |
513 | 0 | // If same signedness (both signed or both unsigned). |
514 | 0 | return lhs < rhs; |
515 | 0 | } else if constexpr (std::is_same_v<L, bool>) { // bool special case |
516 | 0 | return static_cast<R>(lhs) < rhs; |
517 | 0 | } else if constexpr (std::is_same_v<R, bool>) { // bool special case |
518 | 0 | return lhs < static_cast<L>(rhs); |
519 | 0 | } else if constexpr (std::is_signed_v<R>) { |
520 | 0 | // If 'right' is negative, then result is 'false', otherwise cast & compare. |
521 | 0 | return rhs > 0 && lhs < static_cast<std::make_unsigned_t<R>>(rhs); |
522 | 0 | } else { |
523 | 0 | // If 'left' is negative, then result is 'true', otherwise cast & compare. |
524 | 0 | return lhs < 0 || static_cast<std::make_unsigned_t<L>>(lhs) < rhs; |
525 | 0 | } |
526 | 0 | } Unexecuted instantiation: bool nameof::detail::cmp_less<unsigned int, int>(unsigned int, int) Unexecuted instantiation: bool nameof::detail::cmp_less<int, unsigned int>(int, unsigned int) |
527 | | |
528 | | template <typename I> |
529 | 0 | constexpr I log2(I value) noexcept { |
530 | 0 | static_assert(std::is_integral_v<I>, "nameof::detail::log2 requires integral type."); |
531 | 0 |
|
532 | 0 | if constexpr (std::is_same_v<I, bool>) { // bool special case |
533 | 0 | return assert(false), value; |
534 | 0 | } else { |
535 | 0 | auto ret = I{0}; |
536 | 0 | for (; value > I{1}; value >>= I{1}, ++ret) {} |
537 | 0 |
|
538 | 0 | return ret; |
539 | 0 | } |
540 | 0 | } |
541 | | |
542 | | template <typename T> |
543 | | struct nameof_enum_supported |
544 | | #if defined(NAMEOF_ENUM_SUPPORTED) && NAMEOF_ENUM_SUPPORTED || defined(NAMEOF_ENUM_NO_CHECK_SUPPORT) |
545 | | : std::true_type {}; |
546 | | #else |
547 | | : std::false_type {}; |
548 | | #endif |
549 | | |
550 | | template <typename T, typename R> |
551 | | using enable_if_enum_t = std::enable_if_t<std::is_enum_v<std::decay_t<T>>, R>; |
552 | | |
553 | | template <typename T> |
554 | | inline constexpr bool is_enum_v = std::is_enum_v<T> && std::is_same_v<T, std::decay_t<T>>; |
555 | | |
556 | | template <typename E, E V> |
557 | 0 | constexpr auto n() noexcept { |
558 | 0 | static_assert(is_enum_v<E>, "nameof::detail::n requires enum type."); |
559 | 0 |
|
560 | 0 | if constexpr (nameof_enum_supported<E>::value) { |
561 | 0 | #if defined(__clang__) || defined(__GNUC__) |
562 | 0 | constexpr auto name = pretty_name({__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 2}); |
563 | 0 | #elif defined(_MSC_VER) |
564 | 0 | constexpr auto name = pretty_name({__FUNCSIG__, sizeof(__FUNCSIG__) - 17}); |
565 | 0 | #else |
566 | 0 | constexpr auto name = string_view{}; |
567 | 0 | #endif |
568 | 0 | return name; |
569 | 0 | } else { |
570 | 0 | return string_view{}; |
571 | 0 | } |
572 | 0 | } Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_0EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_1EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_2EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_3EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_4EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_5EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_6EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_7EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_8EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_9EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_10EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_11EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_12EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_13EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_14EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_15EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_16EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_17EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_18EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_19EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_20EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_21EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_22EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_23EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_24EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_25EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_26EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_27EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_28EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_29EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_30EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_31EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_32EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_33EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_34EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_35EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_36EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_37EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_38EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_39EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_40EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_41EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_42EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_43EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_44EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_45EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_46EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_47EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_48EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_49EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_50EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_51EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_52EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_53EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_54EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_55EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_56EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_57EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_58EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_59EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_60EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_61EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_62EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_63EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_64EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_65EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_66EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_67EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_68EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_69EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_70EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_71EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_72EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_73EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_74EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_75EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_76EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_77EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_78EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_79EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_80EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_81EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_82EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_83EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_84EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_85EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_86EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_87EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_88EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_89EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_90EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_91EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_92EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_93EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_94EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_95EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_96EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_97EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_98EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_99EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_100EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_101EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_102EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_103EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_104EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_105EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_106EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_107EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_108EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_109EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_110EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_111EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_112EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_113EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_114EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_115EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_116EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_117EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_118EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_119EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_120EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_121EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_122EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_123EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_124EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_125EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_126EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_127EEEDav Unexecuted instantiation: _ZN6nameof6detail1nIN7simdutf10error_codeETnT_LS3_128EEEDav |
573 | | |
574 | | template <typename E, E V> |
575 | 0 | constexpr auto enum_name() noexcept { |
576 | 0 | [[maybe_unused]] constexpr auto custom_name = customize::enum_name<E>(V); |
577 | 0 |
|
578 | 0 | if constexpr (custom_name.empty()) { |
579 | 0 | constexpr auto name = n<E, V>(); |
580 | 0 | return cstring<name.size()>{name}; |
581 | 0 | } else { |
582 | 0 | return cstring<custom_name.size()>{custom_name}; |
583 | 0 | } |
584 | 0 | } Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_0EEEDav Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_1EEEDav Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_2EEEDav Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_3EEEDav Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_4EEEDav Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_5EEEDav Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_6EEEDav Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_7EEEDav Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_8EEEDav Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_9EEEDav Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_10EEEDav Unexecuted instantiation: _ZN6nameof6detail9enum_nameIN7simdutf10error_codeETnT_LS3_11EEEDav |
585 | | |
586 | | template <typename E, E V> |
587 | | inline constexpr auto enum_name_v = enum_name<E, V>(); |
588 | | |
589 | | template <typename E, auto V> |
590 | 0 | constexpr bool is_valid() noexcept { |
591 | 0 | #if defined(__clang__) && __clang_major__ >= 16 |
592 | 0 | // https://reviews.llvm.org/D130058, https://reviews.llvm.org/D131307 |
593 | 0 | constexpr E v = __builtin_bit_cast(E, V); |
594 | 0 | #else |
595 | 0 | constexpr E v = static_cast<E>(V); |
596 | 0 | #endif |
597 | 0 | [[maybe_unused]] constexpr auto custom_name = customize::enum_name<E>(v); |
598 | 0 | if constexpr (custom_name.empty()) { |
599 | 0 | return n<E, v>().size() != 0; |
600 | 0 | } else { |
601 | 0 | return custom_name.size() != 0; |
602 | 0 | } |
603 | 0 | } Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj0EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj1EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj2EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj3EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj4EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj5EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj6EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj7EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj8EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj9EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj10EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj11EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj12EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj13EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj14EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj15EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj16EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj17EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj18EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj19EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj20EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj21EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj22EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj23EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj24EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj25EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj26EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj27EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj28EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj29EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj30EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj31EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj32EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj33EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj34EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj35EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj36EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj37EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj38EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj39EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj40EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj41EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj42EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj43EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj44EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj45EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj46EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj47EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj48EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj49EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj50EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj51EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj52EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj53EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj54EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj55EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj56EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj57EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj58EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj59EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj60EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj61EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj62EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj63EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj64EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj65EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj66EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj67EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj68EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj69EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj70EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj71EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj72EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj73EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj74EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj75EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj76EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj77EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj78EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj79EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj80EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj81EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj82EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj83EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj84EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj85EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj86EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj87EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj88EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj89EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj90EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj91EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj92EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj93EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj94EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj95EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj96EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj97EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj98EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj99EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj100EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj101EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj102EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj103EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj104EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj105EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj106EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj107EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj108EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj109EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj110EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj111EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj112EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj113EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj114EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj115EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj116EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj117EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj118EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj119EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj120EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj121EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj122EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj123EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj124EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj125EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj126EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj127EEEbv Unexecuted instantiation: _ZN6nameof6detail8is_validIN7simdutf10error_codeETnDaLj128EEEbv |
604 | | |
605 | | template <typename E, int O, bool IsFlags, typename U = std::underlying_type_t<E>> |
606 | 0 | constexpr U ualue(std::size_t i) noexcept { |
607 | 0 | if constexpr (std::is_same_v<U, bool>) { // bool special case |
608 | 0 | static_assert(O == 0, "nameof::detail::ualue requires valid offset."); |
609 | 0 |
|
610 | 0 | return static_cast<U>(i); |
611 | 0 | } else if constexpr (IsFlags) { |
612 | 0 | return static_cast<U>(U{1} << static_cast<U>(static_cast<int>(i) + O)); |
613 | 0 | } else { |
614 | 0 | return static_cast<U>(static_cast<int>(i) + O); |
615 | 0 | } |
616 | 0 | } |
617 | | |
618 | | template <typename E, int O, bool IsFlags, typename U = std::underlying_type_t<E>> |
619 | 0 | constexpr E value(std::size_t i) noexcept { |
620 | 0 | return static_cast<E>(ualue<E, O, IsFlags>(i)); |
621 | 0 | } |
622 | | |
623 | | template <typename E, bool IsFlags, typename U = std::underlying_type_t<E>> |
624 | 0 | constexpr int reflected_min() noexcept { |
625 | 0 | if constexpr (IsFlags) { |
626 | 0 | return 0; |
627 | 0 | } else { |
628 | 0 | constexpr auto lhs = customize::enum_range<E>::min; |
629 | 0 | constexpr auto rhs = (std::numeric_limits<U>::min)(); |
630 | 0 |
|
631 | 0 | if constexpr (cmp_less(rhs, lhs)) { |
632 | 0 | return lhs; |
633 | 0 | } else { |
634 | 0 | return rhs; |
635 | 0 | } |
636 | 0 | } |
637 | 0 | } |
638 | | |
639 | | template <typename E, bool IsFlags, typename U = std::underlying_type_t<E>> |
640 | 0 | constexpr int reflected_max() noexcept { |
641 | 0 | if constexpr (IsFlags) { |
642 | 0 | return std::numeric_limits<U>::digits - 1; |
643 | 0 | } else { |
644 | 0 | constexpr auto lhs = customize::enum_range<E>::max; |
645 | 0 | constexpr auto rhs = (std::numeric_limits<U>::max)(); |
646 | 0 |
|
647 | 0 | if constexpr (cmp_less(lhs, rhs)) { |
648 | 0 | return lhs; |
649 | 0 | } else { |
650 | 0 | return rhs; |
651 | 0 | } |
652 | 0 | } |
653 | 0 | } |
654 | | |
655 | | #define NAMEOF_FOR_EACH_256(T) \ |
656 | | T( 0)T( 1)T( 2)T( 3)T( 4)T( 5)T( 6)T( 7)T( 8)T( 9)T( 10)T( 11)T( 12)T( 13)T( 14)T( 15)T( 16)T( 17)T( 18)T( 19)T( 20)T( 21)T( 22)T( 23)T( 24)T( 25)T( 26)T( 27)T( 28)T( 29)T( 30)T( 31) \ |
657 | | T( 32)T( 33)T( 34)T( 35)T( 36)T( 37)T( 38)T( 39)T( 40)T( 41)T( 42)T( 43)T( 44)T( 45)T( 46)T( 47)T( 48)T( 49)T( 50)T( 51)T( 52)T( 53)T( 54)T( 55)T( 56)T( 57)T( 58)T( 59)T( 60)T( 61)T( 62)T( 63) \ |
658 | | T( 64)T( 65)T( 66)T( 67)T( 68)T( 69)T( 70)T( 71)T( 72)T( 73)T( 74)T( 75)T( 76)T( 77)T( 78)T( 79)T( 80)T( 81)T( 82)T( 83)T( 84)T( 85)T( 86)T( 87)T( 88)T( 89)T( 90)T( 91)T( 92)T( 93)T( 94)T( 95) \ |
659 | | T( 96)T( 97)T( 98)T( 99)T(100)T(101)T(102)T(103)T(104)T(105)T(106)T(107)T(108)T(109)T(110)T(111)T(112)T(113)T(114)T(115)T(116)T(117)T(118)T(119)T(120)T(121)T(122)T(123)T(124)T(125)T(126)T(127) \ |
660 | | T(128)T(129)T(130)T(131)T(132)T(133)T(134)T(135)T(136)T(137)T(138)T(139)T(140)T(141)T(142)T(143)T(144)T(145)T(146)T(147)T(148)T(149)T(150)T(151)T(152)T(153)T(154)T(155)T(156)T(157)T(158)T(159) \ |
661 | | T(160)T(161)T(162)T(163)T(164)T(165)T(166)T(167)T(168)T(169)T(170)T(171)T(172)T(173)T(174)T(175)T(176)T(177)T(178)T(179)T(180)T(181)T(182)T(183)T(184)T(185)T(186)T(187)T(188)T(189)T(190)T(191) \ |
662 | | T(192)T(193)T(194)T(195)T(196)T(197)T(198)T(199)T(200)T(201)T(202)T(203)T(204)T(205)T(206)T(207)T(208)T(209)T(210)T(211)T(212)T(213)T(214)T(215)T(216)T(217)T(218)T(219)T(220)T(221)T(222)T(223) \ |
663 | | T(224)T(225)T(226)T(227)T(228)T(229)T(230)T(231)T(232)T(233)T(234)T(235)T(236)T(237)T(238)T(239)T(240)T(241)T(242)T(243)T(244)T(245)T(246)T(247)T(248)T(249)T(250)T(251)T(252)T(253)T(254)T(255) |
664 | | |
665 | | template <typename E, bool IsFlags, std::size_t Size, int Min, std::size_t I> |
666 | 0 | constexpr void valid_count(bool* valid, std::size_t& count) noexcept { |
667 | 0 | #define NAMEOF_ENUM_V(O) \ |
668 | 0 | if constexpr ((I + O) < Size) { \ |
669 | 0 | if constexpr (is_valid<E, ualue<E, Min, IsFlags>(I + O)>()) { \ |
670 | 0 | valid[I + O] = true; \ |
671 | 0 | ++count; \ |
672 | 0 | } \ |
673 | 0 | } |
674 | 0 |
|
675 | 0 | NAMEOF_FOR_EACH_256(NAMEOF_ENUM_V) |
676 | 0 |
|
677 | 0 | if constexpr ((I + 256) < Size) { |
678 | 0 | valid_count<E, IsFlags, Size, Min, I + 256>(valid, count); |
679 | 0 | } |
680 | 0 | #undef NAMEOF_ENUM_V |
681 | 0 | } |
682 | | |
683 | | template <std::size_t N> |
684 | | struct valid_count_t { |
685 | | std::size_t count = 0; |
686 | | bool valid[N] = {}; |
687 | | }; |
688 | | |
689 | | template <typename E, bool IsFlags, std::size_t Size, int Min> |
690 | 0 | constexpr auto valid_count() noexcept { |
691 | 0 | valid_count_t<Size> vc; |
692 | 0 | valid_count<E, IsFlags, Size, Min, 0>(vc.valid, vc.count); |
693 | 0 | return vc; |
694 | 0 | } |
695 | | |
696 | | template <typename E, bool IsFlags, std::size_t Size, int Min> |
697 | 0 | constexpr auto values() noexcept { |
698 | 0 | constexpr auto vc = valid_count<E, IsFlags, Size, Min>(); |
699 | 0 |
|
700 | 0 | if constexpr (vc.count > 0) { |
701 | 0 | #if defined(NAMEOF_ARRAY_CONSTEXPR) |
702 | 0 | std::array<E, vc.count> values = {}; |
703 | 0 | #else |
704 | 0 | E values[vc.count] = {}; |
705 | 0 | #endif |
706 | 0 | for (std::size_t i = 0, v = 0; v < vc.count; ++i) { |
707 | 0 | if (vc.valid[i]) { |
708 | 0 | values[v++] = value<E, Min, IsFlags>(i); |
709 | 0 | } |
710 | 0 | } |
711 | 0 | #if defined(NAMEOF_ARRAY_CONSTEXPR) |
712 | 0 | return values; |
713 | 0 | #else |
714 | 0 | return to_array(values, std::make_index_sequence<vc.count>{}); |
715 | 0 | #endif |
716 | 0 | } else { |
717 | 0 | return std::array<E, 0>{}; |
718 | 0 | } |
719 | 0 | } |
720 | | |
721 | | template <typename E, bool IsFlags, typename U = std::underlying_type_t<E>> |
722 | 0 | constexpr auto values() noexcept { |
723 | 0 | constexpr auto min = reflected_min<E, IsFlags>(); |
724 | 0 | constexpr auto max = reflected_max<E, IsFlags>(); |
725 | 0 | constexpr auto range_size = max - min + 1; |
726 | 0 | static_assert(range_size > 0, "nameof::enum_range requires valid size."); |
727 | 0 | static_assert(range_size < (std::numeric_limits<std::uint16_t>::max)(), "nameof::enum_range requires valid size."); |
728 | 0 |
|
729 | 0 | return values<E, IsFlags, range_size, min>(); |
730 | 0 | } |
731 | | |
732 | | template <typename E, bool IsFlags = false> |
733 | | inline constexpr auto values_v = values<E, IsFlags>(); |
734 | | |
735 | | template <typename E, bool IsFlags = false> |
736 | | inline constexpr auto count_v = values_v<E, IsFlags>.size(); |
737 | | |
738 | | template <typename E, bool IsFlags = false, typename U = std::underlying_type_t<E>> |
739 | | inline constexpr auto min_v = (count_v<E, IsFlags> > 0) ? static_cast<U>(values_v<E, IsFlags>.front()) : U{0}; |
740 | | |
741 | | template <typename E, bool IsFlags = false, typename U = std::underlying_type_t<E>> |
742 | | inline constexpr auto max_v = (count_v<E, IsFlags> > 0) ? static_cast<U>(values_v<E, IsFlags>.back()) : U{0}; |
743 | | |
744 | | template <typename E, bool IsFlags, std::size_t... I> |
745 | 0 | constexpr auto names(std::index_sequence<I...>) noexcept { |
746 | 0 | constexpr auto names = std::array<string_view, sizeof...(I)>{{enum_name_v<E, values_v<E, IsFlags>[I]>...}}; |
747 | 0 | return names; |
748 | 0 | } |
749 | | |
750 | | template <typename E, bool IsFlags = false> |
751 | | inline constexpr auto names_v = names<E, IsFlags>(std::make_index_sequence<count_v<E, IsFlags>>{}); |
752 | | |
753 | | template <typename E, bool IsFlags, typename U = std::underlying_type_t<E>> |
754 | 0 | constexpr bool is_sparse() noexcept { |
755 | 0 | if constexpr (count_v<E, IsFlags> == 0) { |
756 | 0 | return false; |
757 | 0 | } else if constexpr (std::is_same_v<U, bool>) { // bool special case |
758 | 0 | return false; |
759 | 0 | } else { |
760 | 0 | constexpr auto max = IsFlags ? log2(max_v<E, IsFlags>) : max_v<E, IsFlags>; |
761 | 0 | constexpr auto min = IsFlags ? log2(min_v<E, IsFlags>) : min_v<E, IsFlags>; |
762 | 0 | constexpr auto range_size = max - min + 1; |
763 | 0 |
|
764 | 0 | return range_size != count_v<E, IsFlags>; |
765 | 0 | } |
766 | 0 | } |
767 | | |
768 | | template <typename E, bool IsFlags = false> |
769 | | inline constexpr bool is_sparse_v = is_sparse<E, IsFlags>(); |
770 | | |
771 | | template <typename E, bool IsFlags = false, typename U = std::underlying_type_t<E>> |
772 | | constexpr E enum_value(std::size_t i) noexcept { |
773 | | if constexpr (is_sparse_v<E, IsFlags>) { |
774 | | return values_v<E, IsFlags>[i]; |
775 | | } else { |
776 | | constexpr auto min = IsFlags ? log2(min_v<E, IsFlags>) : min_v<E, IsFlags>; |
777 | | |
778 | | return value<E, min, IsFlags>(i); |
779 | | } |
780 | | } |
781 | | |
782 | | template <typename... T> |
783 | | struct nameof_type_supported |
784 | | #if defined(NAMEOF_TYPE_SUPPORTED) && NAMEOF_TYPE_SUPPORTED || defined(NAMEOF_TYPE_NO_CHECK_SUPPORT) |
785 | | : std::true_type {}; |
786 | | #else |
787 | | : std::false_type {}; |
788 | | #endif |
789 | | |
790 | | template <typename... T> |
791 | | struct nameof_type_rtti_supported |
792 | | #if defined(NAMEOF_TYPE_RTTI_SUPPORTED) && NAMEOF_TYPE_RTTI_SUPPORTED || defined(NAMEOF_TYPE_NO_CHECK_SUPPORT) |
793 | | : std::true_type {}; |
794 | | #else |
795 | | : std::false_type {}; |
796 | | #endif |
797 | | |
798 | | template <typename... T> |
799 | | struct nameof_member_supported |
800 | | #if defined(NAMEOF_MEMBER_SUPPORTED) && NAMEOF_MEMBER_SUPPORTED || defined(NAMEOF_TYPE_NO_CHECK_SUPPORT) |
801 | | : std::true_type {}; |
802 | | #else |
803 | | : std::false_type {}; |
804 | | #endif |
805 | | |
806 | | template <typename... T> |
807 | | struct nameof_pointer_supported |
808 | | #if defined(NAMEOF_POINTER_SUPPORTED) && NAMEOF_POINTER_SUPPORTED || defined(NAMEOF_TYPE_NO_CHECK_SUPPORT) |
809 | | : std::true_type {}; |
810 | | #else |
811 | | : std::false_type {}; |
812 | | #endif |
813 | | |
814 | | #if defined(_MSC_VER) && !defined(__clang__) |
815 | | template <typename T> |
816 | | struct identity { |
817 | | using type = T; |
818 | | }; |
819 | | #else |
820 | | template <typename T> |
821 | | using identity = T; |
822 | | #endif |
823 | | |
824 | | template <typename T> |
825 | | using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>; |
826 | | |
827 | | template <typename T, typename R> |
828 | | using enable_if_has_short_name_t = std::enable_if_t<!std::is_array_v<T> && !std::is_pointer_v<T>, R>; |
829 | | |
830 | | template <typename... T> |
831 | | constexpr auto n() noexcept { |
832 | | #if defined(_MSC_VER) && !defined(__clang__) |
833 | | [[maybe_unused]] constexpr auto custom_name = customize::type_name<typename T::type...>(); |
834 | | #else |
835 | | [[maybe_unused]] constexpr auto custom_name = customize::type_name<T...>(); |
836 | | #endif |
837 | | |
838 | | if constexpr (custom_name.empty() && nameof_type_supported<T...>::value) { |
839 | | #if defined(__clang__) |
840 | | constexpr string_view name{__PRETTY_FUNCTION__ + 31, sizeof(__PRETTY_FUNCTION__) - 34}; |
841 | | #elif defined(__GNUC__) |
842 | | constexpr string_view name{__PRETTY_FUNCTION__ + 46, sizeof(__PRETTY_FUNCTION__) - 49}; |
843 | | #elif defined(_MSC_VER) |
844 | | constexpr string_view name{__FUNCSIG__ + 63, sizeof(__FUNCSIG__) - 81 - (__FUNCSIG__[sizeof(__FUNCSIG__) - 19] == ' ' ? 1 : 0)}; |
845 | | #else |
846 | | constexpr auto name = string_view{}; |
847 | | #endif |
848 | | return cstring<name.size()>{name}; |
849 | | } else { |
850 | | return cstring<custom_name.size()>{custom_name}; |
851 | | } |
852 | | } |
853 | | |
854 | | template <typename... T> |
855 | | inline constexpr auto type_name_v = n<T...>(); |
856 | | |
857 | | #if __has_include(<cxxabi.h>) |
858 | | template <typename T> |
859 | | string nameof_type_rtti(const char* tn) { |
860 | | static_assert(nameof_type_rtti_supported<T>::value, "nameof::nameof_type_rtti unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
861 | | const auto dmg = abi::__cxa_demangle(tn, nullptr, nullptr, nullptr); |
862 | | const auto name = string{dmg}; |
863 | | free(dmg); |
864 | | assert(!name.empty() && "Type does not have a name."); |
865 | | |
866 | | return name; |
867 | | } |
868 | | |
869 | | template <typename T> |
870 | | string nameof_full_type_rtti(const char* tn) { |
871 | | static_assert(nameof_type_rtti_supported<T>::value, "nameof::nameof_type_rtti unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
872 | | const auto dmg = abi::__cxa_demangle(tn, nullptr, nullptr, nullptr); |
873 | | auto name = string{dmg}; |
874 | | free(dmg); |
875 | | assert(!name.empty() && "Type does not have a name."); |
876 | | if constexpr (std::is_const_v<std::remove_reference_t<T>>) { |
877 | | name = string{"const "}.append(name); |
878 | | } |
879 | | if constexpr (std::is_volatile_v<std::remove_reference_t<T>>) { |
880 | | name = string{"volatile "}.append(name); |
881 | | } |
882 | | if constexpr (std::is_lvalue_reference_v<T>) { |
883 | | name.append(1, '&'); |
884 | | } |
885 | | if constexpr (std::is_rvalue_reference_v<T>) { |
886 | | name.append("&&"); |
887 | | } |
888 | | |
889 | | return name; |
890 | | } |
891 | | |
892 | | template <typename T, enable_if_has_short_name_t<T, int> = 0> |
893 | | string nameof_short_type_rtti(const char* tn) { |
894 | | static_assert(nameof_type_rtti_supported<T>::value, "nameof::nameof_type_rtti unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
895 | | const auto dmg = abi::__cxa_demangle(tn, nullptr, nullptr, nullptr); |
896 | | const auto pname = pretty_name(dmg); |
897 | | const auto name = string{pname.data(), pname.size()}; |
898 | | free(dmg); |
899 | | assert(!name.empty() && "Type does not have a short name."); |
900 | | |
901 | | return name; |
902 | | } |
903 | | #else |
904 | | template <typename T> |
905 | | string nameof_type_rtti(const char* tn) { |
906 | | static_assert(nameof_type_rtti_supported<T>::value, "nameof::nameof_type_rtti unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
907 | | const auto name = string_view{tn}; |
908 | | assert(!name.empty() && "Type does not have a name."); |
909 | | return {name.data(), name.size()}; |
910 | | } |
911 | | |
912 | | template <typename T> |
913 | | string nameof_full_type_rtti(const char* tn) { |
914 | | static_assert(nameof_type_rtti_supported<T>::value, "nameof::nameof_type_rtti unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
915 | | auto name = string{tn}; |
916 | | assert(!name.empty() && "Type does not have a name."); |
917 | | if constexpr (std::is_const_v<std::remove_reference_t<T>>) { |
918 | | name = string{"const "}.append(name); |
919 | | } |
920 | | if constexpr (std::is_volatile_v<std::remove_reference_t<T>>) { |
921 | | name = string{"volatile "}.append(name); |
922 | | } |
923 | | if constexpr (std::is_lvalue_reference_v<T>) { |
924 | | name.append(1, '&'); |
925 | | } |
926 | | if constexpr (std::is_rvalue_reference_v<T>) { |
927 | | name.append("&&"); |
928 | | } |
929 | | return name; |
930 | | } |
931 | | |
932 | | template <typename T, enable_if_has_short_name_t<T, int> = 0> |
933 | | string nameof_short_type_rtti(const char* tn) { |
934 | | static_assert(nameof_type_rtti_supported<T>::value, "nameof::nameof_type_rtti unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
935 | | const auto name = pretty_name(tn); |
936 | | assert(!name.empty() && "Type does not have a short name."); |
937 | | return {name.data(), name.size()}; |
938 | | } |
939 | | #endif |
940 | | |
941 | | template <auto V, auto U = V> |
942 | | constexpr auto n() noexcept { |
943 | | [[maybe_unused]] constexpr auto custom_name = customize::member_name<V>(); |
944 | | |
945 | | if constexpr (custom_name.empty() && nameof_member_supported<decltype(V)>::value) { |
946 | | #if defined(__clang__) || defined(__GNUC__) |
947 | | constexpr auto name = pretty_name({__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 2}); |
948 | | #elif defined(_MSC_VER) && defined(_MSVC_LANG) && _MSVC_LANG >= 202002L |
949 | | constexpr auto name = pretty_name({__FUNCSIG__, |
950 | | sizeof(__FUNCSIG__) - 18 + std::is_member_function_pointer_v<decltype(U)>}); |
951 | | #else |
952 | | constexpr auto name = string_view{}; |
953 | | #endif |
954 | | return cstring<name.size()>{name}; |
955 | | } else { |
956 | | return cstring<custom_name.size()>{custom_name}; |
957 | | } |
958 | | } |
959 | | |
960 | | #if defined(__clang__) || defined(__GNUC__) |
961 | | template <auto V> |
962 | | inline constexpr auto member_name_v = n<V>(); |
963 | | #elif defined(_MSC_VER) && defined(_MSVC_LANG) && _MSVC_LANG >= 202002L |
964 | | template <typename From, typename Type> |
965 | | From get_base_type(Type From::*); |
966 | | |
967 | | template <typename T> |
968 | | extern T nonexist_object; |
969 | | |
970 | | template<class T> |
971 | | struct Store { |
972 | | T v; |
973 | | }; |
974 | | |
975 | | template<class T> |
976 | | Store(T) -> Store<T>; |
977 | | |
978 | | template <auto V> |
979 | | consteval auto get_member_name() noexcept { |
980 | | if constexpr (std::is_member_function_pointer_v<decltype(V)>) { |
981 | | return n<V>(); |
982 | | } else { |
983 | | constexpr bool is_defined = sizeof(decltype(get_base_type(V))) != 0; |
984 | | static_assert(is_defined, "nameof::nameof_member member name can use only if the struct is already fully defined. Please use NAMEOF macro, or separate definition and declaration."); |
985 | | if constexpr (is_defined) { |
986 | | return n<V, Store{&(nonexist_object<decltype(get_base_type(V))>.*V)}>(); |
987 | | } else { |
988 | | return ""; |
989 | | } |
990 | | } |
991 | | } |
992 | | |
993 | | template <auto V> |
994 | | inline constexpr auto member_name_v = get_member_name<V>(); |
995 | | #else |
996 | | template <auto V> |
997 | | inline constexpr auto member_name_v = cstring<0>{}; |
998 | | #endif |
999 | | |
1000 | | template <auto U, auto V> |
1001 | | struct is_same : std::false_type {}; |
1002 | | |
1003 | | template <auto U> |
1004 | | struct is_same<U, U> : std::true_type {}; |
1005 | | |
1006 | | template <auto P> |
1007 | | constexpr bool is_nullptr_v = is_same<P, static_cast<std::remove_reference_t<decltype(P)>>(nullptr)>::value; |
1008 | | |
1009 | | template <auto V> |
1010 | | constexpr auto p() noexcept { |
1011 | | [[maybe_unused]] constexpr auto custom_name = customize::pointer_name<V>().empty() && is_nullptr_v<V> ? "nullptr" : customize::pointer_name<V>(); |
1012 | | |
1013 | | if constexpr (custom_name.empty() && nameof_pointer_supported<decltype(V)>::value) { |
1014 | | #if defined(__clang__) |
1015 | | constexpr auto name = pretty_name({__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 2}); |
1016 | | #elif defined(__GNUC__) |
1017 | | constexpr bool has_parenthesis = __PRETTY_FUNCTION__[sizeof(__PRETTY_FUNCTION__) - 3] == ')'; |
1018 | | constexpr auto name = pretty_name({__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 2 - has_parenthesis}); |
1019 | | #elif defined(_MSC_VER) && defined(_MSVC_LANG) && _MSVC_LANG >= 202002L |
1020 | | constexpr auto name = pretty_name({__FUNCSIG__, sizeof(__FUNCSIG__) - 17}); |
1021 | | #else |
1022 | | constexpr auto name = string_view{}; |
1023 | | #endif |
1024 | | return cstring<name.size()>{name}; |
1025 | | } else { |
1026 | | return cstring<custom_name.size()>{custom_name}; |
1027 | | } |
1028 | | } |
1029 | | |
1030 | | template <auto V> |
1031 | | inline constexpr auto pointer_name_v = p<V>(); |
1032 | | |
1033 | | } // namespace nameof::detail |
1034 | | |
1035 | | // Checks is nameof_type supported compiler. |
1036 | | inline constexpr bool is_nameof_type_supported = detail::nameof_type_supported<void>::value; |
1037 | | |
1038 | | // Checks is nameof_type_rtti supported compiler. |
1039 | | inline constexpr bool is_nameof_type_rtti_supported = detail::nameof_type_rtti_supported<void>::value; |
1040 | | |
1041 | | // Checks is nameof_member supported compiler. |
1042 | | inline constexpr bool is_nameof_member_supported = detail::nameof_member_supported<void>::value; |
1043 | | |
1044 | | // Checks is nameof_pointer supported compiler. |
1045 | | inline constexpr bool is_nameof_pointer_supported = detail::nameof_pointer_supported<void>::value; |
1046 | | |
1047 | | // Checks is nameof_enum supported compiler. |
1048 | | inline constexpr bool is_nameof_enum_supported = detail::nameof_enum_supported<void>::value; |
1049 | | |
1050 | | // Obtains name of enum variable. |
1051 | | template <typename E> |
1052 | 0 | [[nodiscard]] constexpr auto nameof_enum(E value) noexcept -> detail::enable_if_enum_t<E, string_view> { |
1053 | 0 | using D = std::decay_t<E>; |
1054 | 0 | using U = std::underlying_type_t<D>; |
1055 | 0 | static_assert(detail::nameof_enum_supported<D>::value, "nameof::nameof_enum unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
1056 | 0 | static_assert(detail::count_v<D> > 0, "nameof::nameof_enum requires enum implementation and valid max and min."); |
1057 | |
|
1058 | | if constexpr (detail::is_sparse_v<D>) { |
1059 | | for (std::size_t i = 0; i < detail::count_v<D>; ++i) { |
1060 | | if (detail::enum_value<D>(i) == value) { |
1061 | | return detail::names_v<D>[i]; |
1062 | | } |
1063 | | } |
1064 | 0 | } else { |
1065 | 0 | const auto v = static_cast<U>(value); |
1066 | 0 | if (v >= detail::min_v<D> && v <= detail::max_v<D>) { |
1067 | 0 | return detail::names_v<D>[static_cast<std::size_t>(v - detail::min_v<D>)]; |
1068 | 0 | } |
1069 | 0 | } |
1070 | 0 | return {}; // Value out of range. |
1071 | 0 | } |
1072 | | |
1073 | | // Obtains name of enum variable or default value if enum variable out of range. |
1074 | | template <typename E> |
1075 | | [[nodiscard]] auto nameof_enum_or(E value, string_view default_value) -> detail::enable_if_enum_t<E, string> { |
1076 | | using D = std::decay_t<E>; |
1077 | | static_assert(detail::nameof_enum_supported<D>::value, "nameof::nameof_enum_or unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
1078 | | static_assert(detail::count_v<D> > 0, "nameof::nameof_enum_or requires enum implementation and valid max and min."); |
1079 | | |
1080 | | if (auto v = nameof_enum<D>(value); !v.empty()) { |
1081 | | return string{v.data(), v.size()}; |
1082 | | } |
1083 | | return string{default_value.data(), default_value.size()}; |
1084 | | } |
1085 | | |
1086 | | // Obtains name of enum-flags variable. |
1087 | | template <typename E> |
1088 | | [[nodiscard]] auto nameof_enum_flag(E value, char sep = '|') -> detail::enable_if_enum_t<E, string> { |
1089 | | using D = std::decay_t<E>; |
1090 | | using U = std::underlying_type_t<D>; |
1091 | | static_assert(detail::nameof_enum_supported<D>::value, "nameof::nameof_enum_flag unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
1092 | | static_assert(detail::count_v<D, true> > 0, "nameof::nameof_enum_flag requires enum-flags implementation."); |
1093 | | |
1094 | | string name; |
1095 | | auto check_value = U{0}; |
1096 | | for (std::size_t i = 0; i < detail::count_v<D, true>; ++i) { |
1097 | | if (const auto v = static_cast<U>(detail::enum_value<D, true>(i)); (static_cast<U>(value) & v) != 0) { |
1098 | | if (const auto n = detail::names_v<D, true>[i]; !n.empty()) { |
1099 | | check_value |= v; |
1100 | | if (!name.empty()) { |
1101 | | name.append(1, sep); |
1102 | | } |
1103 | | name.append(n.data(), n.size()); |
1104 | | } else { |
1105 | | return {}; // Value out of range. |
1106 | | } |
1107 | | } |
1108 | | } |
1109 | | |
1110 | | if (check_value != 0 && check_value == static_cast<U>(value)) { |
1111 | | return name; |
1112 | | } |
1113 | | return {}; // Invalid value or out of range. |
1114 | | } |
1115 | | |
1116 | | // Obtains name of static storage enum variable. |
1117 | | // This version is much lighter on the compile times and is not restricted to the enum_range limitation. |
1118 | | template <auto V> |
1119 | | [[nodiscard]] constexpr auto nameof_enum() noexcept -> detail::enable_if_enum_t<decltype(V), string_view> { |
1120 | | using D = std::decay_t<decltype(V)>; |
1121 | | static_assert(detail::nameof_enum_supported<D>::value, "nameof::nameof_enum unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
1122 | | constexpr string_view name = detail::enum_name_v<D, V>; |
1123 | | static_assert(!name.empty(), "Enum value does not have a name."); |
1124 | | return name; |
1125 | | } |
1126 | | |
1127 | | // Obtains name of type, reference and cv-qualifiers are ignored. |
1128 | | template <typename T> |
1129 | | [[nodiscard]] constexpr string_view nameof_type() noexcept { |
1130 | | static_assert(detail::nameof_type_supported<T>::value, "nameof::nameof_type unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
1131 | | using U = detail::identity<detail::remove_cvref_t<T>>; |
1132 | | constexpr string_view name = detail::type_name_v<U>; |
1133 | | static_assert(!name.empty(), "Type does not have a name."); |
1134 | | return name; |
1135 | | } |
1136 | | |
1137 | | // Obtains full name of type, with reference and cv-qualifiers. |
1138 | | template <typename T> |
1139 | | [[nodiscard]] constexpr string_view nameof_full_type() noexcept { |
1140 | | static_assert(detail::nameof_type_supported<T>::value, "nameof::nameof_type unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
1141 | | using U = detail::identity<T>; |
1142 | | constexpr string_view name = detail::type_name_v<U>; |
1143 | | static_assert(!name.empty(), "Type does not have a full name."); |
1144 | | return name; |
1145 | | } |
1146 | | |
1147 | | // Obtains short name of type. |
1148 | | template <typename T> |
1149 | | [[nodiscard]] constexpr auto nameof_short_type() noexcept -> detail::enable_if_has_short_name_t<T, string_view> { |
1150 | | static_assert(detail::nameof_type_supported<T>::value, "nameof::nameof_type unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
1151 | | using U = detail::identity<detail::remove_cvref_t<T>>; |
1152 | | constexpr string_view name = detail::pretty_name(detail::type_name_v<U>); |
1153 | | static_assert(!name.empty(), "Type does not have a short name."); |
1154 | | return name; |
1155 | | } |
1156 | | |
1157 | | // Obtains name of member. |
1158 | | template <auto V> |
1159 | | [[nodiscard]] constexpr auto nameof_member() noexcept -> std::enable_if_t<std::is_member_pointer_v<decltype(V)>, string_view> { |
1160 | | static_assert(detail::nameof_member_supported<decltype(V)>::value, "nameof::nameof_member unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
1161 | | constexpr string_view name = detail::member_name_v<V>; |
1162 | | static_assert(!name.empty(), "Member does not have a name."); |
1163 | | return name; |
1164 | | } |
1165 | | |
1166 | | // Obtains name of a function, a global or class static variable. |
1167 | | template <auto V> |
1168 | | [[nodiscard]] constexpr auto nameof_pointer() noexcept -> std::enable_if_t<std::is_pointer_v<decltype(V)>, string_view> { |
1169 | | static_assert(detail::nameof_pointer_supported<decltype(V)>::value, "nameof::nameof_pointer unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); |
1170 | | constexpr string_view name = detail::pointer_name_v<V>; |
1171 | | static_assert(!name.empty(), "Pointer does not have a name."); |
1172 | | return name; |
1173 | | } |
1174 | | |
1175 | | } // namespace nameof |
1176 | | |
1177 | | // Obtains name of variable, function, macro. |
1178 | 18.1k | #define NAMEOF(...) []() constexpr noexcept { \ |
1179 | 18.1k | ::std::void_t<decltype(__VA_ARGS__)>(); \ |
1180 | 18.1k | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ |
1181 | 18.1k | static_assert(!_name.empty(), "Expression does not have a name."); \ |
1182 | 18.1k | constexpr auto _size = _name.size(); \ |
1183 | 18.1k | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ |
1184 | 18.1k | return _nameof; }() ValidationFunctionTrait<(UtfEncodings)0>::ValidationWithErrorsName::{lambda()#1}::operator()() const Line | Count | Source | 1178 | 2 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 2 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 2 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 2 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 2 | constexpr auto _size = _name.size(); \ | 1183 | 2 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 2 | return _nameof; }() |
ValidationFunctionTrait<(UtfEncodings)1>::ValidationWithErrorsName::{lambda()#1}::operator()() const Line | Count | Source | 1178 | 2 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 2 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 2 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 2 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 2 | constexpr auto _size = _name.size(); \ | 1183 | 2 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 2 | return _nameof; }() |
ValidationFunctionTrait<(UtfEncodings)3>::ValidationWithErrorsName::{lambda()#1}::operator()() const Line | Count | Source | 1178 | 2 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 2 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 2 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 2 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 2 | constexpr auto _size = _name.size(); \ | 1183 | 2 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 2 | return _nameof; }() |
ValidationFunctionTrait<(UtfEncodings)2>::ValidationWithErrorsName::{lambda()#1}::operator()() const Line | Count | Source | 1178 | 2 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 2 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 2 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 2 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 2 | constexpr auto _size = _name.size(); \ | 1183 | 2 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 2 | return _nameof; }() |
conversion.cpp:populate_functions()::$_0::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 113 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 113 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 113 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 113 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 113 | constexpr auto _size = _name.size(); \ | 1183 | 113 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 113 | return _nameof; }() |
conversion.cpp:populate_functions()::$_0::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 113 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 113 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 113 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 113 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 113 | constexpr auto _size = _name.size(); \ | 1183 | 113 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 113 | return _nameof; }() |
conversion.cpp:populate_functions()::$_1::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 204 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 204 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 204 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 204 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 204 | constexpr auto _size = _name.size(); \ | 1183 | 204 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 204 | return _nameof; }() |
conversion.cpp:populate_functions()::$_1::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 204 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 204 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 204 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 204 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 204 | constexpr auto _size = _name.size(); \ | 1183 | 204 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 204 | return _nameof; }() |
conversion.cpp:populate_functions()::$_2::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 64 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 64 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 64 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 64 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 64 | constexpr auto _size = _name.size(); \ | 1183 | 64 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 64 | return _nameof; }() |
conversion.cpp:populate_functions()::$_2::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 64 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 64 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 64 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 64 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 64 | constexpr auto _size = _name.size(); \ | 1183 | 64 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 64 | return _nameof; }() |
conversion.cpp:populate_functions()::$_3::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 230 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 230 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 230 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 230 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 230 | constexpr auto _size = _name.size(); \ | 1183 | 230 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 230 | return _nameof; }() |
conversion.cpp:populate_functions()::$_3::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 230 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 230 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 230 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 230 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 230 | constexpr auto _size = _name.size(); \ | 1183 | 230 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 230 | return _nameof; }() |
conversion.cpp:populate_functions()::$_4::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 65 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 65 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 65 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 65 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 65 | constexpr auto _size = _name.size(); \ | 1183 | 65 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 65 | return _nameof; }() |
conversion.cpp:populate_functions()::$_4::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 65 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 65 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 65 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 65 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 65 | constexpr auto _size = _name.size(); \ | 1183 | 65 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 65 | return _nameof; }() |
conversion.cpp:populate_functions()::$_5::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 67 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 67 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 67 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 67 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 67 | constexpr auto _size = _name.size(); \ | 1183 | 67 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 67 | return _nameof; }() |
conversion.cpp:populate_functions()::$_5::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 67 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 67 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 67 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 67 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 67 | constexpr auto _size = _name.size(); \ | 1183 | 67 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 67 | return _nameof; }() |
conversion.cpp:populate_functions()::$_6::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 117 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 117 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 117 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 117 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 117 | constexpr auto _size = _name.size(); \ | 1183 | 117 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 117 | return _nameof; }() |
conversion.cpp:populate_functions()::$_6::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 117 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 117 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 117 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 117 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 117 | constexpr auto _size = _name.size(); \ | 1183 | 117 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 117 | return _nameof; }() |
conversion.cpp:populate_functions()::$_7::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 222 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 222 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 222 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 222 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 222 | constexpr auto _size = _name.size(); \ | 1183 | 222 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 222 | return _nameof; }() |
conversion.cpp:populate_functions()::$_7::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 222 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 222 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 222 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 222 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 222 | constexpr auto _size = _name.size(); \ | 1183 | 222 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 222 | return _nameof; }() |
conversion.cpp:populate_functions()::$_8::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 194 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 194 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 194 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 194 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 194 | constexpr auto _size = _name.size(); \ | 1183 | 194 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 194 | return _nameof; }() |
conversion.cpp:populate_functions()::$_8::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 194 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 194 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 194 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 194 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 194 | constexpr auto _size = _name.size(); \ | 1183 | 194 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 194 | return _nameof; }() |
conversion.cpp:populate_functions()::$_9::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 239 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 239 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 239 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 239 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 239 | constexpr auto _size = _name.size(); \ | 1183 | 239 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 239 | return _nameof; }() |
conversion.cpp:populate_functions()::$_9::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 239 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 239 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 239 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 239 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 239 | constexpr auto _size = _name.size(); \ | 1183 | 239 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 239 | return _nameof; }() |
conversion.cpp:populate_functions()::$_10::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 67 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 67 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 67 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 67 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 67 | constexpr auto _size = _name.size(); \ | 1183 | 67 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 67 | return _nameof; }() |
conversion.cpp:populate_functions()::$_10::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 67 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 67 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 67 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 67 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 67 | constexpr auto _size = _name.size(); \ | 1183 | 67 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 67 | return _nameof; }() |
conversion.cpp:populate_functions()::$_11::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 117 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 117 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 117 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 117 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 117 | constexpr auto _size = _name.size(); \ | 1183 | 117 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 117 | return _nameof; }() |
conversion.cpp:populate_functions()::$_11::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 117 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 117 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 117 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 117 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 117 | constexpr auto _size = _name.size(); \ | 1183 | 117 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 117 | return _nameof; }() |
conversion.cpp:populate_functions()::$_12::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 159 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 159 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 159 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 159 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 159 | constexpr auto _size = _name.size(); \ | 1183 | 159 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 159 | return _nameof; }() |
conversion.cpp:populate_functions()::$_12::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 159 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 159 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 159 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 159 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 159 | constexpr auto _size = _name.size(); \ | 1183 | 159 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 159 | return _nameof; }() |
conversion.cpp:populate_functions()::$_13::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 61 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 61 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 61 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 61 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 61 | constexpr auto _size = _name.size(); \ | 1183 | 61 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 61 | return _nameof; }() |
conversion.cpp:populate_functions()::$_13::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 61 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 61 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 61 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 61 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 61 | constexpr auto _size = _name.size(); \ | 1183 | 61 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 61 | return _nameof; }() |
conversion.cpp:populate_functions()::$_14::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 137 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 137 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 137 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 137 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 137 | constexpr auto _size = _name.size(); \ | 1183 | 137 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 137 | return _nameof; }() |
conversion.cpp:populate_functions()::$_14::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 137 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 137 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 137 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 137 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 137 | constexpr auto _size = _name.size(); \ | 1183 | 137 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 137 | return _nameof; }() |
conversion.cpp:populate_functions()::$_15::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 182 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 182 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 182 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 182 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 182 | constexpr auto _size = _name.size(); \ | 1183 | 182 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 182 | return _nameof; }() |
conversion.cpp:populate_functions()::$_15::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 182 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 182 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 182 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 182 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 182 | constexpr auto _size = _name.size(); \ | 1183 | 182 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 182 | return _nameof; }() |
conversion.cpp:populate_functions()::$_16::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 107 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 107 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 107 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 107 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 107 | constexpr auto _size = _name.size(); \ | 1183 | 107 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 107 | return _nameof; }() |
conversion.cpp:populate_functions()::$_16::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 107 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 107 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 107 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 107 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 107 | constexpr auto _size = _name.size(); \ | 1183 | 107 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 107 | return _nameof; }() |
conversion.cpp:populate_functions()::$_17::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 212 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 212 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 212 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 212 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 212 | constexpr auto _size = _name.size(); \ | 1183 | 212 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 212 | return _nameof; }() |
conversion.cpp:populate_functions()::$_17::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 212 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 212 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 212 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 212 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 212 | constexpr auto _size = _name.size(); \ | 1183 | 212 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 212 | return _nameof; }() |
conversion.cpp:populate_functions()::$_18::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 179 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 179 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 179 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 179 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 179 | constexpr auto _size = _name.size(); \ | 1183 | 179 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 179 | return _nameof; }() |
conversion.cpp:populate_functions()::$_18::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 179 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 179 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 179 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 179 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 179 | constexpr auto _size = _name.size(); \ | 1183 | 179 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 179 | return _nameof; }() |
conversion.cpp:populate_functions()::$_19::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 458 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 458 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 458 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 458 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 458 | constexpr auto _size = _name.size(); \ | 1183 | 458 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 458 | return _nameof; }() |
conversion.cpp:populate_functions()::$_19::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 458 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 458 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 458 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 458 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 458 | constexpr auto _size = _name.size(); \ | 1183 | 458 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 458 | return _nameof; }() |
conversion.cpp:populate_functions()::$_20::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 290 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 290 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 290 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 290 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 290 | constexpr auto _size = _name.size(); \ | 1183 | 290 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 290 | return _nameof; }() |
conversion.cpp:populate_functions()::$_20::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 290 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 290 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 290 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 290 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 290 | constexpr auto _size = _name.size(); \ | 1183 | 290 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 290 | return _nameof; }() |
conversion.cpp:populate_functions()::$_21::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 416 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 416 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 416 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 416 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 416 | constexpr auto _size = _name.size(); \ | 1183 | 416 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 416 | return _nameof; }() |
conversion.cpp:populate_functions()::$_21::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 416 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 416 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 416 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 416 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 416 | constexpr auto _size = _name.size(); \ | 1183 | 416 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 416 | return _nameof; }() |
conversion.cpp:populate_functions()::$_22::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 418 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 418 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 418 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 418 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 418 | constexpr auto _size = _name.size(); \ | 1183 | 418 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 418 | return _nameof; }() |
conversion.cpp:populate_functions()::$_22::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 418 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 418 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 418 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 418 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 418 | constexpr auto _size = _name.size(); \ | 1183 | 418 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 418 | return _nameof; }() |
conversion.cpp:populate_functions()::$_23::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 396 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 396 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 396 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 396 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 396 | constexpr auto _size = _name.size(); \ | 1183 | 396 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 396 | return _nameof; }() |
conversion.cpp:populate_functions()::$_23::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 396 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 396 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 396 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 396 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 396 | constexpr auto _size = _name.size(); \ | 1183 | 396 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 396 | return _nameof; }() |
conversion.cpp:populate_functions()::$_24::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 118 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 118 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 118 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 118 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 118 | constexpr auto _size = _name.size(); \ | 1183 | 118 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 118 | return _nameof; }() |
conversion.cpp:populate_functions()::$_24::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 118 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 118 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 118 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 118 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 118 | constexpr auto _size = _name.size(); \ | 1183 | 118 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 118 | return _nameof; }() |
conversion.cpp:populate_functions()::$_25::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 174 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 174 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 174 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 174 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 174 | constexpr auto _size = _name.size(); \ | 1183 | 174 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 174 | return _nameof; }() |
conversion.cpp:populate_functions()::$_25::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 174 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 174 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 174 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 174 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 174 | constexpr auto _size = _name.size(); \ | 1183 | 174 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 174 | return _nameof; }() |
conversion.cpp:populate_functions()::$_26::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 375 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 375 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 375 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 375 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 375 | constexpr auto _size = _name.size(); \ | 1183 | 375 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 375 | return _nameof; }() |
conversion.cpp:populate_functions()::$_26::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 375 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 375 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 375 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 375 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 375 | constexpr auto _size = _name.size(); \ | 1183 | 375 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 375 | return _nameof; }() |
conversion.cpp:populate_functions()::$_27::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 120 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 120 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 120 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 120 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 120 | constexpr auto _size = _name.size(); \ | 1183 | 120 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 120 | return _nameof; }() |
conversion.cpp:populate_functions()::$_27::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 120 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 120 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 120 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 120 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 120 | constexpr auto _size = _name.size(); \ | 1183 | 120 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 120 | return _nameof; }() |
conversion.cpp:populate_functions()::$_28::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 187 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 187 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 187 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 187 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 187 | constexpr auto _size = _name.size(); \ | 1183 | 187 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 187 | return _nameof; }() |
conversion.cpp:populate_functions()::$_28::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 187 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 187 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 187 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 187 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 187 | constexpr auto _size = _name.size(); \ | 1183 | 187 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 187 | return _nameof; }() |
conversion.cpp:populate_functions()::$_29::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 336 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 336 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 336 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 336 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 336 | constexpr auto _size = _name.size(); \ | 1183 | 336 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 336 | return _nameof; }() |
conversion.cpp:populate_functions()::$_29::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 336 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 336 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 336 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 336 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 336 | constexpr auto _size = _name.size(); \ | 1183 | 336 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 336 | return _nameof; }() |
conversion.cpp:populate_functions()::$_30::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 222 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 222 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 222 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 222 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 222 | constexpr auto _size = _name.size(); \ | 1183 | 222 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 222 | return _nameof; }() |
conversion.cpp:populate_functions()::$_30::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 222 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 222 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 222 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 222 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 222 | constexpr auto _size = _name.size(); \ | 1183 | 222 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 222 | return _nameof; }() |
conversion.cpp:populate_functions()::$_31::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 321 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 321 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 321 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 321 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 321 | constexpr auto _size = _name.size(); \ | 1183 | 321 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 321 | return _nameof; }() |
conversion.cpp:populate_functions()::$_31::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 321 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 321 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 321 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 321 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 321 | constexpr auto _size = _name.size(); \ | 1183 | 321 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 321 | return _nameof; }() |
conversion.cpp:populate_functions()::$_32::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 290 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 290 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 290 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 290 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 290 | constexpr auto _size = _name.size(); \ | 1183 | 290 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 290 | return _nameof; }() |
conversion.cpp:populate_functions()::$_32::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 290 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 290 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 290 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 290 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 290 | constexpr auto _size = _name.size(); \ | 1183 | 290 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 290 | return _nameof; }() |
conversion.cpp:populate_functions()::$_33::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 447 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 447 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 447 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 447 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 447 | constexpr auto _size = _name.size(); \ | 1183 | 447 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 447 | return _nameof; }() |
conversion.cpp:populate_functions()::$_33::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 447 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 447 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 447 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 447 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 447 | constexpr auto _size = _name.size(); \ | 1183 | 447 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 447 | return _nameof; }() |
conversion.cpp:populate_functions()::$_34::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 300 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 300 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 300 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 300 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 300 | constexpr auto _size = _name.size(); \ | 1183 | 300 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 300 | return _nameof; }() |
conversion.cpp:populate_functions()::$_34::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 300 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 300 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 300 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 300 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 300 | constexpr auto _size = _name.size(); \ | 1183 | 300 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 300 | return _nameof; }() |
conversion.cpp:populate_functions()::$_35::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 350 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 350 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 350 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 350 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 350 | constexpr auto _size = _name.size(); \ | 1183 | 350 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 350 | return _nameof; }() |
conversion.cpp:populate_functions()::$_35::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 350 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 350 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 350 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 350 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 350 | constexpr auto _size = _name.size(); \ | 1183 | 350 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 350 | return _nameof; }() |
conversion.cpp:populate_functions()::$_36::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 316 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 316 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 316 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 316 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 316 | constexpr auto _size = _name.size(); \ | 1183 | 316 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 316 | return _nameof; }() |
conversion.cpp:populate_functions()::$_36::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 316 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 316 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 316 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 316 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 316 | constexpr auto _size = _name.size(); \ | 1183 | 316 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 316 | return _nameof; }() |
conversion.cpp:populate_functions()::$_37::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 396 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 396 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 396 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 396 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 396 | constexpr auto _size = _name.size(); \ | 1183 | 396 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 396 | return _nameof; }() |
conversion.cpp:populate_functions()::$_37::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 396 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 396 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 396 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 396 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 396 | constexpr auto _size = _name.size(); \ | 1183 | 396 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 396 | return _nameof; }() |
conversion.cpp:populate_functions()::$_38::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 41 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 41 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 41 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 41 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 41 | constexpr auto _size = _name.size(); \ | 1183 | 41 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 41 | return _nameof; }() |
conversion.cpp:populate_functions()::$_38::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 41 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 41 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 41 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 41 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 41 | constexpr auto _size = _name.size(); \ | 1183 | 41 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 41 | return _nameof; }() |
conversion.cpp:populate_functions()::$_39::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 52 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 52 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 52 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 52 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 52 | constexpr auto _size = _name.size(); \ | 1183 | 52 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 52 | return _nameof; }() |
conversion.cpp:populate_functions()::$_39::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 52 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 52 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 52 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 52 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 52 | constexpr auto _size = _name.size(); \ | 1183 | 52 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 52 | return _nameof; }() |
conversion.cpp:populate_functions()::$_40::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 36 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 36 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 36 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 36 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 36 | constexpr auto _size = _name.size(); \ | 1183 | 36 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 36 | return _nameof; }() |
conversion.cpp:populate_functions()::$_40::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 36 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 36 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 36 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 36 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 36 | constexpr auto _size = _name.size(); \ | 1183 | 36 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 36 | return _nameof; }() |
conversion.cpp:populate_functions()::$_41::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#3}::operator()() const Line | Count | Source | 1178 | 289 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 289 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 289 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 289 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 289 | constexpr auto _size = _name.size(); \ | 1183 | 289 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 289 | return _nameof; }() |
conversion.cpp:populate_functions()::$_41::operator()(std::__1::span<char const, 18446744073709551615ul>) const::{lambda()#4}::operator()() const Line | Count | Source | 1178 | 289 | #define NAMEOF(...) []() constexpr noexcept { \ | 1179 | 289 | ::std::void_t<decltype(__VA_ARGS__)>(); \ | 1180 | 289 | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__); \ | 1181 | 289 | static_assert(!_name.empty(), "Expression does not have a name."); \ | 1182 | 289 | constexpr auto _size = _name.size(); \ | 1183 | 289 | constexpr auto _nameof = ::nameof::cstring<_size>{_name}; \ | 1184 | 289 | return _nameof; }() |
|
1185 | | |
1186 | | // Obtains full name of variable, function, macro. |
1187 | | #define NAMEOF_FULL(...) []() constexpr noexcept { \ |
1188 | | ::std::void_t<decltype(__VA_ARGS__)>(); \ |
1189 | | constexpr auto _name = ::nameof::detail::pretty_name(#__VA_ARGS__, false); \ |
1190 | | static_assert(!_name.empty(), "Expression does not have a name."); \ |
1191 | | constexpr auto _size = _name.size(); \ |
1192 | | constexpr auto _nameof_full = ::nameof::cstring<_size>{_name}; \ |
1193 | | return _nameof_full; }() |
1194 | | |
1195 | | // Obtains raw name of variable, function, macro. |
1196 | | #define NAMEOF_RAW(...) []() constexpr noexcept { \ |
1197 | | ::std::void_t<decltype(__VA_ARGS__)>(); \ |
1198 | | constexpr auto _name = ::nameof::string_view{#__VA_ARGS__}; \ |
1199 | | static_assert(!_name.empty(), "Expression does not have a name."); \ |
1200 | | constexpr auto _size = _name.size(); \ |
1201 | | constexpr auto _nameof_raw = ::nameof::cstring<_size>{_name}; \ |
1202 | | return _nameof_raw; }() |
1203 | | |
1204 | | // Obtains name of enum variable. |
1205 | 0 | #define NAMEOF_ENUM(...) ::nameof::nameof_enum<::std::decay_t<decltype(__VA_ARGS__)>>(__VA_ARGS__) |
1206 | | |
1207 | | // Obtains name of enum variable or default value if enum variable out of range. |
1208 | | #define NAMEOF_ENUM_OR(...) ::nameof::nameof_enum_or(__VA_ARGS__) |
1209 | | |
1210 | | // Obtains name of static storage enum variable. |
1211 | | // This version is much lighter on the compile times and is not restricted to the enum_range limitation. |
1212 | | #define NAMEOF_ENUM_CONST(...) ::nameof::nameof_enum<__VA_ARGS__>() |
1213 | | |
1214 | | // Obtains name of enum-flags variable. |
1215 | | #define NAMEOF_ENUM_FLAG(...) ::nameof::nameof_enum_flag<::std::decay_t<decltype(__VA_ARGS__)>>(__VA_ARGS__) |
1216 | | |
1217 | | // Obtains type name, reference and cv-qualifiers are ignored. |
1218 | | #define NAMEOF_TYPE(...) ::nameof::nameof_type<__VA_ARGS__>() |
1219 | | |
1220 | | // Obtains full type name, with reference and cv-qualifiers. |
1221 | | #define NAMEOF_FULL_TYPE(...) ::nameof::nameof_full_type<__VA_ARGS__>() |
1222 | | |
1223 | | // Obtains short type name. |
1224 | | #define NAMEOF_SHORT_TYPE(...) ::nameof::nameof_short_type<__VA_ARGS__>() |
1225 | | |
1226 | | // Obtains type name of expression, reference and cv-qualifiers are ignored. |
1227 | | #define NAMEOF_TYPE_EXPR(...) ::nameof::nameof_type<decltype(__VA_ARGS__)>() |
1228 | | |
1229 | | // Obtains full type name of expression, with reference and cv-qualifiers. |
1230 | | #define NAMEOF_FULL_TYPE_EXPR(...) ::nameof::nameof_full_type<decltype(__VA_ARGS__)>() |
1231 | | |
1232 | | // Obtains short type name of expression. |
1233 | | #define NAMEOF_SHORT_TYPE_EXPR(...) ::nameof::nameof_short_type<decltype(__VA_ARGS__)>() |
1234 | | |
1235 | | // Obtains type name, with reference and cv-qualifiers, using RTTI. |
1236 | | #define NAMEOF_TYPE_RTTI(...) ::nameof::detail::nameof_type_rtti<::std::void_t<decltype(__VA_ARGS__)>>(typeid(__VA_ARGS__).name()) |
1237 | | |
1238 | | // Obtains full type name, using RTTI. |
1239 | | #define NAMEOF_FULL_TYPE_RTTI(...) ::nameof::detail::nameof_full_type_rtti<decltype(__VA_ARGS__)>(typeid(__VA_ARGS__).name()) |
1240 | | |
1241 | | // Obtains short type name, using RTTI. |
1242 | | #define NAMEOF_SHORT_TYPE_RTTI(...) ::nameof::detail::nameof_short_type_rtti<decltype(__VA_ARGS__)>(typeid(__VA_ARGS__).name()) |
1243 | | |
1244 | | // Obtains name of member. |
1245 | | #define NAMEOF_MEMBER(...) ::nameof::nameof_member<__VA_ARGS__>() |
1246 | | |
1247 | | // Obtains name of a function, a global or class static variable. |
1248 | | #define NAMEOF_POINTER(...) ::nameof::nameof_pointer<__VA_ARGS__>() |
1249 | | |
1250 | | #if defined(__clang__) |
1251 | | # pragma clang diagnostic pop |
1252 | | #elif defined(__GNUC__) |
1253 | | # pragma GCC diagnostic pop |
1254 | | #elif defined(_MSC_VER) |
1255 | | # pragma warning(pop) |
1256 | | #endif |
1257 | | |
1258 | | #endif // NEARGYE_NAMEOF_HPP |