Debian Codegraph @

src/corelib/global/patches/tlexpected/0006-Namespace-TL_-macros-with-Q23_.patch

raw
1 From 5676e5f83597dc1fb32b551c863633eff102e879 Mon Sep 17 00:00:00 2001
2 From: Marc Mutz <[email protected]>
3 Date: Thu, 27 Nov 2025 07:51:19 +0100
4 Subject: [PATCH] Namespace TL_ macros with Q23_
5
6 Change-Id: Ib5762ec8ebe81e0c750da84be29531b7179c5025
7 ---
8 src/corelib/global/qexpected_p.h | 312 +++++++++++++++----------------
9 1 file changed, 156 insertions(+), 156 deletions(-)
10
11 diff --git a/src/corelib/global/qexpected_p.h b/src/corelib/global/qexpected_p.h
12 index 24ea5be1e5e..54bcae51102 100644
13 --- a/src/corelib/global/qexpected_p.h
14 +++ b/src/corelib/global/qexpected_p.h
15 @@ -16,8 +16,8 @@
16 // <http://creativecommons.org/publicdomain/zero/1.0/>.
17 ///
18
19 -#ifndef TL_EXPECTED_HPP
20 -#define TL_EXPECTED_HPP
21 +#ifndef Q23_TL_EXPECTED_HPP
22 +#define Q23_TL_EXPECTED_HPP
23
24 //
25 // W A R N I N G
26 @@ -30,9 +30,9 @@
27 // We mean it.
28 //
29
30 -#define TL_EXPECTED_VERSION_MAJOR 1
31 -#define TL_EXPECTED_VERSION_MINOR 1
32 -#define TL_EXPECTED_VERSION_PATCH 0
33 +#define Q23_TL_EXPECTED_VERSION_MAJOR 1
34 +#define Q23_TL_EXPECTED_VERSION_MINOR 1
35 +#define Q23_TL_EXPECTED_VERSION_PATCH 0
36
37 #include <QtCore/private/qglobal_p.h>
38 #include <QtCore/qassert.h>
39 @@ -44,45 +44,45 @@
40 #include <type_traits>
41 #include <utility>
42
43 -#define TL_ASSERT Q_ASSERT
44 +#define Q23_TL_ASSERT Q_ASSERT
45
46 #if defined(__EXCEPTIONS) || defined(_CPPUNWIND)
47 -#define TL_EXPECTED_EXCEPTIONS_ENABLED
48 +#define Q23_TL_EXPECTED_EXCEPTIONS_ENABLED
49 #endif
50
51 -#if defined(TL_EXPECTED_EXCEPTIONS_ENABLED) && defined(QT_NO_EXCEPTIONS)
52 -# undef TL_EXPECTED_EXCEPTIONS_ENABLED
53 +#if defined(Q23_TL_EXPECTED_EXCEPTIONS_ENABLED) && defined(QT_NO_EXCEPTIONS)
54 +# undef Q23_TL_EXPECTED_EXCEPTIONS_ENABLED
55 #endif
56
57 #if (defined(_MSC_VER) && _MSC_VER == 1900)
58 -#define TL_EXPECTED_MSVC2015
59 -#define TL_EXPECTED_MSVC2015_CONSTEXPR
60 +#define Q23_TL_EXPECTED_MSVC2015
61 +#define Q23_TL_EXPECTED_MSVC2015_CONSTEXPR
62 #else
63 -#define TL_EXPECTED_MSVC2015_CONSTEXPR constexpr
64 +#define Q23_TL_EXPECTED_MSVC2015_CONSTEXPR constexpr
65 #endif
66
67 #if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \
68 !defined(__clang__))
69 -#define TL_EXPECTED_GCC49
70 +#define Q23_TL_EXPECTED_GCC49
71 #endif
72
73 #if (defined(__GNUC__) && __GNUC__ == 5 && __GNUC_MINOR__ <= 4 && \
74 !defined(__clang__))
75 -#define TL_EXPECTED_GCC54
76 +#define Q23_TL_EXPECTED_GCC54
77 #endif
78
79 #if (defined(__GNUC__) && __GNUC__ == 5 && __GNUC_MINOR__ <= 5 && \
80 !defined(__clang__))
81 -#define TL_EXPECTED_GCC55
82 +#define Q23_TL_EXPECTED_GCC55
83 #endif
84
85 -#if !defined(TL_ASSERT)
86 +#if !defined(Q23_TL_ASSERT)
87 //can't have assert in constexpr in C++11 and GCC 4.9 has a compiler bug
88 -#if (TL_CPLUSPLUS > 201103L) && !defined(TL_EXPECTED_GCC49)
89 +#if (Q23_TL_CPLUSPLUS > 201103L) && !defined(Q23_TL_EXPECTED_GCC49)
90 #include <cassert>
91 -#define TL_ASSERT(x) assert(x)
92 +#define Q23_TL_ASSERT(x) assert(x)
93 #else
94 -#define TL_ASSERT(x)
95 +#define Q23_TL_ASSERT(x)
96 #endif
97 #endif
98
99 @@ -90,22 +90,22 @@
100 !defined(__clang__))
101 // GCC < 5 doesn't support overloading on const&& for member functions
102
103 -#define TL_EXPECTED_NO_CONSTRR
104 +#define Q23_TL_EXPECTED_NO_CONSTRR
105 // GCC < 5 doesn't support some standard C++11 type traits
106 -#define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \
107 +#define Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \
108 std::has_trivial_copy_constructor<T>
109 -#define TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \
110 +#define Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \
111 std::has_trivial_copy_assign<T>
112
113 // This one will be different for GCC 5.7 if it's ever supported
114 -#define TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \
115 +#define Q23_TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \
116 std::is_trivially_destructible<T>
117
118 // GCC 5 < v < 8 has a bug in is_trivially_copy_constructible which breaks
119 // std::vector for non-copyable types
120 #elif (defined(__GNUC__) && __GNUC__ < 8 && !defined(__clang__))
121 -#ifndef TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX
122 -#define TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX
123 +#ifndef Q23_TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX
124 +#define Q23_TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX
125 QT_BEGIN_NAMESPACE
126 namespace q23 {
127 namespace detail {
128 @@ -121,50 +121,50 @@ struct is_trivially_copy_constructible<std::vector<T, A>> : std::false_type {};
129 QT_END_NAMESPACE
130 #endif
131
132 -#define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \
133 +#define Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \
134 q23::detail::is_trivially_copy_constructible<T>
135 -#define TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \
136 +#define Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \
137 std::is_trivially_copy_assignable<T>
138 -#define TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \
139 +#define Q23_TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \
140 std::is_trivially_destructible<T>
141 #else
142 -#define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \
143 +#define Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \
144 std::is_trivially_copy_constructible<T>
145 -#define TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \
146 +#define Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \
147 std::is_trivially_copy_assignable<T>
148 -#define TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \
149 +#define Q23_TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \
150 std::is_trivially_destructible<T>
151 #endif
152
153 #ifdef _MSVC_LANG
154 -#define TL_CPLUSPLUS _MSVC_LANG
155 +#define Q23_TL_CPLUSPLUS _MSVC_LANG
156 #else
157 -#define TL_CPLUSPLUS __cplusplus
158 +#define Q23_TL_CPLUSPLUS __cplusplus
159 #endif
160
161 -#if TL_CPLUSPLUS > 201103L
162 -#define TL_EXPECTED_CXX14
163 +#if Q23_TL_CPLUSPLUS > 201103L
164 +#define Q23_TL_EXPECTED_CXX14
165 #endif
166
167 -#ifdef TL_EXPECTED_GCC49
168 -#define TL_EXPECTED_GCC49_CONSTEXPR
169 +#ifdef Q23_TL_EXPECTED_GCC49
170 +#define Q23_TL_EXPECTED_GCC49_CONSTEXPR
171 #else
172 -#define TL_EXPECTED_GCC49_CONSTEXPR constexpr
173 +#define Q23_TL_EXPECTED_GCC49_CONSTEXPR constexpr
174 #endif
175
176 -#if (TL_CPLUSPLUS == 201103L || defined(TL_EXPECTED_MSVC2015) || \
177 - defined(TL_EXPECTED_GCC49))
178 -#define TL_EXPECTED_11_CONSTEXPR
179 +#if (Q23_TL_CPLUSPLUS == 201103L || defined(Q23_TL_EXPECTED_MSVC2015) || \
180 + defined(Q23_TL_EXPECTED_GCC49))
181 +#define Q23_TL_EXPECTED_11_CONSTEXPR
182 #else
183 -#define TL_EXPECTED_11_CONSTEXPR constexpr
184 +#define Q23_TL_EXPECTED_11_CONSTEXPR constexpr
185 #endif
186
187 QT_BEGIN_NAMESPACE
188 namespace q23 {
189 template <class T, class E> class expected;
190
191 -#ifndef TL_MONOSTATE_INPLACE_MUTEX
192 -#define TL_MONOSTATE_INPLACE_MUTEX
193 +#ifndef Q23_TL_MONOSTATE_INPLACE_MUTEX
194 +#define Q23_TL_MONOSTATE_INPLACE_MUTEX
195 class monostate {};
196
197 struct in_place_t {
198 @@ -196,8 +196,8 @@ public:
199 : m_val(l, std::forward<Args>(args)...) {}
200
201 constexpr const E &error() const & { return m_val; }
202 - TL_EXPECTED_11_CONSTEXPR E &error() & { return m_val; }
203 - TL_EXPECTED_11_CONSTEXPR E &&error() && { return std::move(m_val); }
204 + Q23_TL_EXPECTED_11_CONSTEXPR E &error() & { return m_val; }
205 + Q23_TL_EXPECTED_11_CONSTEXPR E &&error() && { return std::move(m_val); }
206 constexpr const E &&error() const && { return std::move(m_val); }
207
208 private:
209 @@ -245,8 +245,8 @@ static constexpr unexpect_t unexpect{};
210
211 namespace detail {
212 template <typename E>
213 -[[noreturn]] TL_EXPECTED_11_CONSTEXPR void throw_exception(E &&e) {
214 -#ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
215 +[[noreturn]] Q23_TL_EXPECTED_11_CONSTEXPR void throw_exception(E &&e) {
216 +#ifdef Q23_TL_EXPECTED_EXCEPTIONS_ENABLED
217 throw std::forward<E>(e);
218 #else
219 (void)e;
220 @@ -258,8 +258,8 @@ template <typename E>
221 #endif
222 }
223
224 -#ifndef TL_TRAITS_MUTEX
225 -#define TL_TRAITS_MUTEX
226 +#ifndef Q23_TL_TRAITS_MUTEX
227 +#define Q23_TL_TRAITS_MUTEX
228 // C++14-style aliases for brevity
229 template <class T> using remove_const_t = typename std::remove_const<T>::type;
230 template <class T>
231 @@ -278,13 +278,13 @@ struct conjunction<B, Bs...>
232 : std::conditional<bool(B::value), conjunction<Bs...>, B>::type {};
233
234 #if defined(_LIBCPP_VERSION) && __cplusplus == 201103L
235 -#define TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND
236 +#define Q23_TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND
237 #endif
238
239 // In C++11 mode, there's an issue in libc++'s std::mem_fn
240 // which results in a hard-error when using it in a noexcept expression
241 // in some cases. This is a check to workaround the common failing case.
242 -#ifdef TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND
243 +#ifdef Q23_TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND
244 template <class T>
245 struct is_pointer_to_non_const_member_func : std::false_type {};
246 template <class T, class Ret, class... Args>
247 @@ -315,7 +315,7 @@ template <class T> struct is_const_or_const_ref<T const> : std::true_type {};
248 // https://stackoverflow.com/questions/38288042/c11-14-invoke-workaround
249 template <
250 typename Fn, typename... Args,
251 -#ifdef TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND
252 +#ifdef Q23_TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND
253 typename = enable_if_t<!(is_pointer_to_non_const_member_func<Fn>::value &&
254 is_const_or_const_ref<Args...>::value)>,
255 #endif
256 @@ -574,7 +574,7 @@ template <class T, class E> struct expected_storage_base<T, E, true, true> {
257 // T is trivial, E is not.
258 template <class T, class E> struct expected_storage_base<T, E, true, false> {
259 constexpr expected_storage_base() : m_val(T{}), m_has_val(true) {}
260 - TL_EXPECTED_MSVC2015_CONSTEXPR expected_storage_base(no_init_t)
261 + Q23_TL_EXPECTED_MSVC2015_CONSTEXPR expected_storage_base(no_init_t)
262 : m_no_init(), m_has_val(false) {}
263
264 template <class... Args,
265 @@ -675,7 +675,7 @@ template <class E> struct expected_storage_base<void, E, false, true> {
266 #if __GNUC__ <= 5
267 //no constexpr for GCC 4/5 bug
268 #else
269 - TL_EXPECTED_MSVC2015_CONSTEXPR
270 + Q23_TL_EXPECTED_MSVC2015_CONSTEXPR
271 #endif
272 expected_storage_base() : m_has_val(true) {}
273
274 @@ -770,7 +770,7 @@ struct expected_operations_base : expected_storage_base<T, E> {
275 this->m_has_val = false;
276 }
277
278 -#ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
279 +#ifdef Q23_TL_EXPECTED_EXCEPTIONS_ENABLED
280
281 // These assign overloads ensure that the most efficient assignment
282 // implementation is used while maintaining the strong exception guarantee.
283 @@ -820,7 +820,7 @@ struct expected_operations_base : expected_storage_base<T, E> {
284 auto tmp = std::move(geterr());
285 geterr().~unexpected<E>();
286
287 -#ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
288 +#ifdef Q23_TL_EXPECTED_EXCEPTIONS_ENABLED
289 try {
290 construct(rhs.get());
291 } catch (...) {
292 @@ -855,7 +855,7 @@ struct expected_operations_base : expected_storage_base<T, E> {
293 if (!this->m_has_val && rhs.m_has_val) {
294 auto tmp = std::move(geterr());
295 geterr().~unexpected<E>();
296 -#ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
297 +#ifdef Q23_TL_EXPECTED_EXCEPTIONS_ENABLED
298 try {
299 construct(std::move(rhs).get());
300 } catch (...) {
301 @@ -911,27 +911,27 @@ struct expected_operations_base : expected_storage_base<T, E> {
302
303 bool has_value() const { return this->m_has_val; }
304
305 - TL_EXPECTED_11_CONSTEXPR T &get() & { return this->m_val; }
306 + Q23_TL_EXPECTED_11_CONSTEXPR T &get() & { return this->m_val; }
307 constexpr const T &get() const & { return this->m_val; }
308 - TL_EXPECTED_11_CONSTEXPR T &&get() && { return std::move(this->m_val); }
309 -#ifndef TL_EXPECTED_NO_CONSTRR
310 + Q23_TL_EXPECTED_11_CONSTEXPR T &&get() && { return std::move(this->m_val); }
311 +#ifndef Q23_TL_EXPECTED_NO_CONSTRR
312 constexpr const T &&get() const && { return std::move(this->m_val); }
313 #endif
314
315 - TL_EXPECTED_11_CONSTEXPR unexpected<E> &geterr() & {
316 + Q23_TL_EXPECTED_11_CONSTEXPR unexpected<E> &geterr() & {
317 return this->m_unexpect;
318 }
319 constexpr const unexpected<E> &geterr() const & { return this->m_unexpect; }
320 - TL_EXPECTED_11_CONSTEXPR unexpected<E> &&geterr() && {
321 + Q23_TL_EXPECTED_11_CONSTEXPR unexpected<E> &&geterr() && {
322 return std::move(this->m_unexpect);
323 }
324 -#ifndef TL_EXPECTED_NO_CONSTRR
325 +#ifndef Q23_TL_EXPECTED_NO_CONSTRR
326 constexpr const unexpected<E> &&geterr() const && {
327 return std::move(this->m_unexpect);
328 }
329 #endif
330
331 - TL_EXPECTED_11_CONSTEXPR void destroy_val() { get().~T(); }
332 + Q23_TL_EXPECTED_11_CONSTEXPR void destroy_val() { get().~T(); }
333 };
334
335 // This base class provides some handy member functions which can be used in
336 @@ -971,20 +971,20 @@ struct expected_operations_base<void, E> : expected_storage_base<void, E> {
337
338 bool has_value() const { return this->m_has_val; }
339
340 - TL_EXPECTED_11_CONSTEXPR unexpected<E> &geterr() & {
341 + Q23_TL_EXPECTED_11_CONSTEXPR unexpected<E> &geterr() & {
342 return this->m_unexpect;
343 }
344 constexpr const unexpected<E> &geterr() const & { return this->m_unexpect; }
345 - TL_EXPECTED_11_CONSTEXPR unexpected<E> &&geterr() && {
346 + Q23_TL_EXPECTED_11_CONSTEXPR unexpected<E> &&geterr() && {
347 return std::move(this->m_unexpect);
348 }
349 -#ifndef TL_EXPECTED_NO_CONSTRR
350 +#ifndef Q23_TL_EXPECTED_NO_CONSTRR
351 constexpr const unexpected<E> &&geterr() const && {
352 return std::move(this->m_unexpect);
353 }
354 #endif
355
356 - TL_EXPECTED_11_CONSTEXPR void destroy_val() {
357 + Q23_TL_EXPECTED_11_CONSTEXPR void destroy_val() {
358 // no-op
359 }
360 };
361 @@ -992,8 +992,8 @@ struct expected_operations_base<void, E> : expected_storage_base<void, E> {
362 // This class manages conditionally having a trivial copy constructor
363 // This specialization is for when T and E are trivially copy constructible
364 template <class T, class E,
365 - bool = is_void_or<T, TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T)>::
366 - value &&TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(E)::value,
367 + bool = is_void_or<T, Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T)>::
368 + value &&Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(E)::value,
369 bool = (is_copy_constructible_or_void<T>::value &&
370 std::is_copy_constructible<E>::value)>
371 struct expected_copy_base : expected_operations_base<T, E> {
372 @@ -1025,7 +1025,7 @@ struct expected_copy_base<T, E, false, true> : expected_operations_base<T, E> {
373 // doesn't implement an analogue to std::is_trivially_move_constructible. We
374 // have to make do with a non-trivial move constructor even if T is trivially
375 // move constructible
376 -#ifndef TL_EXPECTED_GCC49
377 +#ifndef Q23_TL_EXPECTED_GCC49
378 template <class T, class E,
379 bool = is_void_or<T, std::is_trivially_move_constructible<T>>::value
380 &&std::is_trivially_move_constructible<E>::value>
381 @@ -1058,12 +1058,12 @@ struct expected_move_base<T, E, false> : expected_copy_base<T, E> {
382 // This class manages conditionally having a trivial copy assignment operator
383 template <class T, class E,
384 bool = is_void_or<
385 - T, conjunction<TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T),
386 - TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T),
387 - TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T)>>::value
388 - &&TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(E)::value
389 - &&TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(E)::value
390 - &&TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(E)::value,
391 + T, conjunction<Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T),
392 + Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T),
393 + Q23_TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T)>>::value
394 + &&Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(E)::value
395 + &&Q23_TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(E)::value
396 + &&Q23_TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(E)::value,
397 bool = (is_copy_constructible_or_void<T>::value &&
398 std::is_copy_constructible<E>::value &&
399 is_copy_assignable_or_void<T>::value &&
400 @@ -1093,7 +1093,7 @@ struct expected_copy_assign_base<T, E, false, true> : expected_move_base<T, E> {
401 // doesn't implement an analogue to std::is_trivially_move_assignable. We have
402 // to make do with a non-trivial move assignment operator even if T is trivially
403 // move assignable
404 -#ifndef TL_EXPECTED_GCC49
405 +#ifndef Q23_TL_EXPECTED_GCC49
406 template <class T, class E,
407 bool =
408 is_void_or<T, conjunction<std::is_trivially_destructible<T>,
409 @@ -1330,10 +1330,10 @@ class expected : private detail::expected_move_assign_base<T, E>,
410
411 template <class U = T,
412 detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
413 - TL_EXPECTED_11_CONSTEXPR U &val() {
414 + Q23_TL_EXPECTED_11_CONSTEXPR U &val() {
415 return this->m_val;
416 }
417 - TL_EXPECTED_11_CONSTEXPR unexpected<E> &err() { return this->m_unexpect; }
418 + Q23_TL_EXPECTED_11_CONSTEXPR unexpected<E> &err() { return this->m_unexpect; }
419
420 template <class U = T,
421 detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
422 @@ -1350,19 +1350,19 @@ public:
423 typedef E error_type;
424 typedef unexpected<E> unexpected_type;
425
426 -#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
427 - !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
428 - template <class F> TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) & {
429 +#if defined(Q23_TL_EXPECTED_CXX14) && !defined(Q23_TL_EXPECTED_GCC49) && \
430 + !defined(Q23_TL_EXPECTED_GCC54) && !defined(Q23_TL_EXPECTED_GCC55)
431 + template <class F> Q23_TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) & {
432 return and_then_impl(*this, std::forward<F>(f));
433 }
434 - template <class F> TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) && {
435 + template <class F> Q23_TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) && {
436 return and_then_impl(std::move(*this), std::forward<F>(f));
437 }
438 template <class F> constexpr auto and_then(F &&f) const & {
439 return and_then_impl(*this, std::forward<F>(f));
440 }
441
442 -#ifndef TL_EXPECTED_NO_CONSTRR
443 +#ifndef Q23_TL_EXPECTED_NO_CONSTRR
444 template <class F> constexpr auto and_then(F &&f) const && {
445 return and_then_impl(std::move(*this), std::forward<F>(f));
446 }
447 @@ -1370,13 +1370,13 @@ public:
448
449 #else
450 template <class F>
451 - TL_EXPECTED_11_CONSTEXPR auto
452 + Q23_TL_EXPECTED_11_CONSTEXPR auto
453 and_then(F &&f) & -> decltype(and_then_impl(std::declval<expected &>(),
454 std::forward<F>(f))) {
455 return and_then_impl(*this, std::forward<F>(f));
456 }
457 template <class F>
458 - TL_EXPECTED_11_CONSTEXPR auto
459 + Q23_TL_EXPECTED_11_CONSTEXPR auto
460 and_then(F &&f) && -> decltype(and_then_impl(std::declval<expected &&>(),
461 std::forward<F>(f))) {
462 return and_then_impl(std::move(*this), std::forward<F>(f));
463 @@ -1387,7 +1387,7 @@ public:
464 return and_then_impl(*this, std::forward<F>(f));
465 }
466
467 -#ifndef TL_EXPECTED_NO_CONSTRR
468 +#ifndef Q23_TL_EXPECTED_NO_CONSTRR
469 template <class F>
470 constexpr auto and_then(F &&f) const && -> decltype(and_then_impl(
471 std::declval<expected const &&>(), std::forward<F>(f))) {
472 @@ -1396,12 +1396,12 @@ public:
473 #endif
474 #endif
475
476 -#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
477 - !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
478 - template <class F> TL_EXPECTED_11_CONSTEXPR auto map(F &&f) & {
479 +#if defined(Q23_TL_EXPECTED_CXX14) && !defined(Q23_TL_EXPECTED_GCC49) && \
480 + !defined(Q23_TL_EXPECTED_GCC54) && !defined(Q23_TL_EXPECTED_GCC55)
481 + template <class F> Q23_TL_EXPECTED_11_CONSTEXPR auto map(F &&f) & {
482 return expected_map_impl(*this, std::forward<F>(f));
483 }
484 - template <class F> TL_EXPECTED_11_CONSTEXPR auto map(F &&f) && {
485 + template <class F> Q23_TL_EXPECTED_11_CONSTEXPR auto map(F &&f) && {
486 return expected_map_impl(std::move(*this), std::forward<F>(f));
487 }
488 template <class F> constexpr auto map(F &&f) const & {
489 @@ -1412,13 +1412,13 @@ public:
490 }
491 #else
492 template <class F>
493 - TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(
494 + Q23_TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(
495 std::declval<expected &>(), std::declval<F &&>()))
496 map(F &&f) & {
497 return expected_map_impl(*this, std::forward<F>(f));
498 }
499 template <class F>
500 - TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval<expected>(),
501 + Q23_TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval<expected>(),
502 std::declval<F &&>()))
503 map(F &&f) && {
504 return expected_map_impl(std::move(*this), std::forward<F>(f));
505 @@ -1430,7 +1430,7 @@ public:
506 return expected_map_impl(*this, std::forward<F>(f));
507 }
508
509 -#ifndef TL_EXPECTED_NO_CONSTRR
510 +#ifndef Q23_TL_EXPECTED_NO_CONSTRR
511 template <class F>
512 constexpr decltype(expected_map_impl(std::declval<const expected &&>(),
513 std::declval<F &&>()))
514 @@ -1440,12 +1440,12 @@ public:
515 #endif
516 #endif
517
518 -#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
519 - !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
520 - template <class F> TL_EXPECTED_11_CONSTEXPR auto transform(F &&f) & {
521 +#if defined(Q23_TL_EXPECTED_CXX14) && !defined(Q23_TL_EXPECTED_GCC49) && \
522 + !defined(Q23_TL_EXPECTED_GCC54) && !defined(Q23_TL_EXPECTED_GCC55)
523 + template <class F> Q23_TL_EXPECTED_11_CONSTEXPR auto transform(F &&f) & {
524 return expected_map_impl(*this, std::forward<F>(f));
525 }
526 - template <class F> TL_EXPECTED_11_CONSTEXPR auto transform(F &&f) && {
527 + template <class F> Q23_TL_EXPECTED_11_CONSTEXPR auto transform(F &&f) && {
528 return expected_map_impl(std::move(*this), std::forward<F>(f));
529 }
530 template <class F> constexpr auto transform(F &&f) const & {
531 @@ -1456,13 +1456,13 @@ public:
532 }
533 #else
534 template <class F>
535 - TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(
536 + Q23_TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(
537 std::declval<expected &>(), std::declval<F &&>()))
538 transform(F &&f) & {
539 return expected_map_impl(*this, std::forward<F>(f));
540 }
541 template <class F>
542 - TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval<expected>(),
543 + Q23_TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval<expected>(),
544 std::declval<F &&>()))
545 transform(F &&f) && {
546 return expected_map_impl(std::move(*this), std::forward<F>(f));
547 @@ -1474,7 +1474,7 @@ public:
548 return expected_map_impl(*this, std::forward<F>(f));
549 }
550
551 -#ifndef TL_EXPECTED_NO_CONSTRR
552 +#ifndef Q23_TL_EXPECTED_NO_CONSTRR
553 template <class F>
554 constexpr decltype(expected_map_impl(std::declval<const expected &&>(),
555 std::declval<F &&>()))
556 @@ -1484,12 +1484,12 @@ public:
557 #endif
558 #endif
559
560 -#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
561 - !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
562 - template <class F> TL_EXPECTED_11_CONSTEXPR auto map_error(F &&f) & {
563 +#if defined(Q23_TL_EXPECTED_CXX14) && !defined(Q23_TL_EXPECTED_GCC49) && \
564 + !defined(Q23_TL_EXPECTED_GCC54) && !defined(Q23_TL_EXPECTED_GCC55)
565 + template <class F> Q23_TL_EXPECTED_11_CONSTEXPR auto map_error(F &&f) & {
566 return map_error_impl(*this, std::forward<F>(f));
567 }
568 - template <class F> TL_EXPECTED_11_CONSTEXPR auto map_error(F &&f) && {
569 + template <class F> Q23_TL_EXPECTED_11_CONSTEXPR auto map_error(F &&f) && {
570 return map_error_impl(std::move(*this), std::forward<F>(f));
571 }
572 template <class F> constexpr auto map_error(F &&f) const & {
573 @@ -1500,13 +1500,13 @@ public:
574 }
575 #else
576 template <class F>
577 - TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &>(),
578 + Q23_TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &>(),
579 std::declval<F &&>()))
580 map_error(F &&f) & {
581 return map_error_impl(*this, std::forward<F>(f));
582 }
583 template <class F>
584 - TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &&>(),
585 + Q23_TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &&>(),
586 std::declval<F &&>()))
587 map_error(F &&f) && {
588 return map_error_impl(std::move(*this), std::forward<F>(f));
589 @@ -1518,7 +1518,7 @@ public:
590 return map_error_impl(*this, std::forward<F>(f));
591 }
592
593 -#ifndef TL_EXPECTED_NO_CONSTRR
594 +#ifndef Q23_TL_EXPECTED_NO_CONSTRR
595 template <class F>
596 constexpr decltype(map_error_impl(std::declval<const expected &&>(),
597 std::declval<F &&>()))
598 @@ -1527,12 +1527,12 @@ public:
599 }
600 #endif
601 #endif
602 -#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
603 - !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
604 - template <class F> TL_EXPECTED_11_CONSTEXPR auto transform_error(F &&f) & {
605 +#if defined(Q23_TL_EXPECTED_CXX14) && !defined(Q23_TL_EXPECTED_GCC49) && \
606 + !defined(Q23_TL_EXPECTED_GCC54) && !defined(Q23_TL_EXPECTED_GCC55)
607 + template <class F> Q23_TL_EXPECTED_11_CONSTEXPR auto transform_error(F &&f) & {
608 return map_error_impl(*this, std::forward<F>(f));
609 }
610 - template <class F> TL_EXPECTED_11_CONSTEXPR auto transform_error(F &&f) && {
611 + template <class F> Q23_TL_EXPECTED_11_CONSTEXPR auto transform_error(F &&f) && {
612 return map_error_impl(std::move(*this), std::forward<F>(f));
613 }
614 template <class F> constexpr auto transform_error(F &&f) const & {
615 @@ -1543,13 +1543,13 @@ public:
616 }
617 #else
618 template <class F>
619 - TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &>(),
620 + Q23_TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &>(),
621 std::declval<F &&>()))
622 transform_error(F &&f) & {
623 return map_error_impl(*this, std::forward<F>(f));
624 }
625 template <class F>
626 - TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &&>(),
627 + Q23_TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &&>(),
628 std::declval<F &&>()))
629 transform_error(F &&f) && {
630 return map_error_impl(std::move(*this), std::forward<F>(f));
631 @@ -1561,7 +1561,7 @@ public:
632 return map_error_impl(*this, std::forward<F>(f));
633 }
634
635 -#ifndef TL_EXPECTED_NO_CONSTRR
636 +#ifndef Q23_TL_EXPECTED_NO_CONSTRR
637 template <class F>
638 constexpr decltype(map_error_impl(std::declval<const expected &&>(),
639 std::declval<F &&>()))
640 @@ -1570,11 +1570,11 @@ public:
641 }
642 #endif
643 #endif
644 - template <class F> expected TL_EXPECTED_11_CONSTEXPR or_else(F &&f) & {
645 + template <class F> expected Q23_TL_EXPECTED_11_CONSTEXPR or_else(F &&f) & {
646 return or_else_impl(*this, std::forward<F>(f));
647 }
648
649 - template <class F> expected TL_EXPECTED_11_CONSTEXPR or_else(F &&f) && {
650 + template <class F> expected Q23_TL_EXPECTED_11_CONSTEXPR or_else(F &&f) && {
651 return or_else_impl(std::move(*this), std::forward<F>(f));
652 }
653
654 @@ -1582,7 +1582,7 @@ public:
655 return or_else_impl(*this, std::forward<F>(f));
656 }
657
658 -#ifndef TL_EXPECTED_NO_CONSTRR
659 +#ifndef Q23_TL_EXPECTED_NO_CONSTRR
660 template <class F> expected constexpr or_else(F &&f) const && {
661 return or_else_impl(std::move(*this), std::forward<F>(f));
662 }
663 @@ -1664,7 +1664,7 @@ public:
664 nullptr,
665 detail::expected_enable_from_other<T, E, U, G, const U &, const G &>
666 * = nullptr>
667 - explicit TL_EXPECTED_11_CONSTEXPR expected(const expected<U, G> &rhs)
668 + explicit Q23_TL_EXPECTED_11_CONSTEXPR expected(const expected<U, G> &rhs)
669 : ctor_base(detail::default_constructor_tag{}) {
670 if (rhs.has_value()) {
671 this->construct(*rhs);
672 @@ -1679,7 +1679,7 @@ public:
673 nullptr,
674 detail::expected_enable_from_other<T, E, U, G, const U &, const G &>
675 * = nullptr>
676 - TL_EXPECTED_11_CONSTEXPR expected(const expected<U, G> &rhs)
677 + Q23_TL_EXPECTED_11_CONSTEXPR expected(const expected<U, G> &rhs)
678 : ctor_base(detail::default_constructor_tag{}) {
679 if (rhs.has_value()) {
680 this->construct(*rhs);
681 @@ -1693,7 +1693,7 @@ public:
682 detail::enable_if_t<!(std::is_convertible<U &&, T>::value &&
683 std::is_convertible<G &&, E>::value)> * = nullptr,
684 detail::expected_enable_from_other<T, E, U, G, U &&, G &&> * = nullptr>
685 - explicit TL_EXPECTED_11_CONSTEXPR expected(expected<U, G> &&rhs)
686 + explicit Q23_TL_EXPECTED_11_CONSTEXPR expected(expected<U, G> &&rhs)
687 : ctor_base(detail::default_constructor_tag{}) {
688 if (rhs.has_value()) {
689 this->construct(std::move(*rhs));
690 @@ -1707,7 +1707,7 @@ public:
691 detail::enable_if_t<(std::is_convertible<U &&, T>::value &&
692 std::is_convertible<G &&, E>::value)> * = nullptr,
693 detail::expected_enable_from_other<T, E, U, G, U &&, G &&> * = nullptr>
694 - TL_EXPECTED_11_CONSTEXPR expected(expected<U, G> &&rhs)
695 + Q23_TL_EXPECTED_11_CONSTEXPR expected(expected<U, G> &&rhs)
696 : ctor_base(detail::default_constructor_tag{}) {
697 if (rhs.has_value()) {
698 this->construct(std::move(*rhs));
699 @@ -1720,14 +1720,14 @@ public:
700 class U = T,
701 detail::enable_if_t<!std::is_convertible<U &&, T>::value> * = nullptr,
702 detail::expected_enable_forward_value<T, E, U> * = nullptr>
703 - explicit TL_EXPECTED_MSVC2015_CONSTEXPR expected(U &&v)
704 + explicit Q23_TL_EXPECTED_MSVC2015_CONSTEXPR expected(U &&v)
705 : expected(in_place, std::forward<U>(v)) {}
706
707 template <
708 class U = T,
709 detail::enable_if_t<std::is_convertible<U &&, T>::value> * = nullptr,
710 detail::expected_enable_forward_value<T, E, U> * = nullptr>
711 - TL_EXPECTED_MSVC2015_CONSTEXPR expected(U &&v)
712 + Q23_TL_EXPECTED_MSVC2015_CONSTEXPR expected(U &&v)
713 : expected(in_place, std::forward<U>(v)) {}
714
715 template <
716 @@ -1773,7 +1773,7 @@ public:
717 auto tmp = std::move(err());
718 err().~unexpected<E>();
719
720 -#ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
721 +#ifdef Q23_TL_EXPECTED_EXCEPTIONS_ENABLED
722 try {
723 ::new (valptr()) T(std::forward<U>(v));
724 this->m_has_val = true;
725 @@ -1842,7 +1842,7 @@ public:
726 auto tmp = std::move(err());
727 err().~unexpected<E>();
728
729 -#ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
730 +#ifdef Q23_TL_EXPECTED_EXCEPTIONS_ENABLED
731 try {
732 ::new (valptr()) T(std::forward<Args>(args)...);
733 this->m_has_val = true;
734 @@ -1882,7 +1882,7 @@ public:
735 auto tmp = std::move(err());
736 err().~unexpected<E>();
737
738 -#ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
739 +#ifdef Q23_TL_EXPECTED_EXCEPTIONS_ENABLED
740 try {
741 ::new (valptr()) T(il, std::forward<Args>(args)...);
742 this->m_has_val = true;
743 @@ -1943,7 +1943,7 @@ private:
744 move_constructing_e_can_throw) {
745 auto temp = std::move(val());
746 val().~T();
747 -#ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
748 +#ifdef Q23_TL_EXPECTED_EXCEPTIONS_ENABLED
749 try {
750 ::new (errptr()) unexpected_type(std::move(rhs.err()));
751 rhs.err().~unexpected_type();
752 @@ -1966,7 +1966,7 @@ private:
753 e_is_nothrow_move_constructible) {
754 auto temp = std::move(rhs.err());
755 rhs.err().~unexpected_type();
756 -#ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
757 +#ifdef Q23_TL_EXPECTED_EXCEPTIONS_ENABLED
758 try {
759 ::new (rhs.valptr()) T(std::move(val()));
760 val().~T();
761 @@ -2008,36 +2008,36 @@ public:
762 }
763
764 constexpr const T *operator->() const {
765 - TL_ASSERT(has_value());
766 + Q23_TL_ASSERT(has_value());
767 return valptr();
768 }
769 - TL_EXPECTED_11_CONSTEXPR T *operator->() {
770 - TL_ASSERT(has_value());
771 + Q23_TL_EXPECTED_11_CONSTEXPR T *operator->() {
772 + Q23_TL_ASSERT(has_value());
773 return valptr();
774 }
775
776 template <class U = T,
777 detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
778 constexpr const U &operator*() const & {
779 - TL_ASSERT(has_value());
780 + Q23_TL_ASSERT(has_value());
781 return val();
782 }
783 template <class U = T,
784 detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
785 - TL_EXPECTED_11_CONSTEXPR U &operator*() & {
786 - TL_ASSERT(has_value());
787 + Q23_TL_EXPECTED_11_CONSTEXPR U &operator*() & {
788 + Q23_TL_ASSERT(has_value());
789 return val();
790 }
791 template <class U = T,
792 detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
793 constexpr const U &&operator*() const && {
794 - TL_ASSERT(has_value());
795 + Q23_TL_ASSERT(has_value());
796 return std::move(val());
797 }
798 template <class U = T,
799 detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
800 - TL_EXPECTED_11_CONSTEXPR U &&operator*() && {
801 - TL_ASSERT(has_value());
802 + Q23_TL_EXPECTED_11_CONSTEXPR U &&operator*() && {
803 + Q23_TL_ASSERT(has_value());
804 return std::move(val());
805 }
806
807 @@ -2046,47 +2046,47 @@ public:
808
809 template <class U = T,
810 detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
811 - TL_EXPECTED_11_CONSTEXPR const U &value() const & {
812 + Q23_TL_EXPECTED_11_CONSTEXPR const U &value() const & {
813 if (!has_value())
814 detail::throw_exception(bad_expected_access<E>(err().error()));
815 return val();
816 }
817 template <class U = T,
818 detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
819 - TL_EXPECTED_11_CONSTEXPR U &value() & {
820 + Q23_TL_EXPECTED_11_CONSTEXPR U &value() & {
821 if (!has_value())
822 detail::throw_exception(bad_expected_access<E>(err().error()));
823 return val();
824 }
825 template <class U = T,
826 detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
827 - TL_EXPECTED_11_CONSTEXPR const U &&value() const && {
828 + Q23_TL_EXPECTED_11_CONSTEXPR const U &&value() const && {
829 if (!has_value())
830 detail::throw_exception(bad_expected_access<E>(std::move(err()).error()));
831 return std::move(val());
832 }
833 template <class U = T,
834 detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
835 - TL_EXPECTED_11_CONSTEXPR U &&value() && {
836 + Q23_TL_EXPECTED_11_CONSTEXPR U &&value() && {
837 if (!has_value())
838 detail::throw_exception(bad_expected_access<E>(std::move(err()).error()));
839 return std::move(val());
840 }
841
842 constexpr const E &error() const & {
843 - TL_ASSERT(!has_value());
844 + Q23_TL_ASSERT(!has_value());
845 return err().error();
846 }
847 - TL_EXPECTED_11_CONSTEXPR E &error() & {
848 - TL_ASSERT(!has_value());
849 + Q23_TL_EXPECTED_11_CONSTEXPR E &error() & {
850 + Q23_TL_ASSERT(!has_value());
851 return err().error();
852 }
853 constexpr const E &&error() const && {
854 - TL_ASSERT(!has_value());
855 + Q23_TL_ASSERT(!has_value());
856 return std::move(err().error());
857 }
858 - TL_EXPECTED_11_CONSTEXPR E &&error() && {
859 - TL_ASSERT(!has_value());
860 + Q23_TL_EXPECTED_11_CONSTEXPR E &&error() && {
861 + Q23_TL_ASSERT(!has_value());
862 return std::move(err().error());
863 }
864
865 @@ -2096,7 +2096,7 @@ public:
866 "T must be copy-constructible and convertible to from U&&");
867 return bool(*this) ? **this : static_cast<T>(std::forward<U>(v));
868 }
869 - template <class U> TL_EXPECTED_11_CONSTEXPR T value_or(U &&v) && {
870 + template <class U> Q23_TL_EXPECTED_11_CONSTEXPR T value_or(U &&v) && {
871 static_assert(std::is_move_constructible<T>::value &&
872 std::is_convertible<U &&, T>::value,
873 "T must be move-constructible and convertible to from U&&");
874 @@ -2109,7 +2109,7 @@ template <class Exp> using exp_t = typename detail::decay_t<Exp>::value_type;
875 template <class Exp> using err_t = typename detail::decay_t<Exp>::error_type;
876 template <class Exp, class Ret> using ret_t = expected<Ret, err_t<Exp>>;
877
878 -#ifdef TL_EXPECTED_CXX14
879 +#ifdef Q23_TL_EXPECTED_CXX14
880 template <class Exp, class F,
881 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
882 class Ret = decltype(detail::invoke(std::declval<F>(),
883 @@ -2156,7 +2156,7 @@ constexpr auto and_then_impl(Exp &&exp, F &&f) -> Ret {
884 }
885 #endif
886
887 -#ifdef TL_EXPECTED_CXX14
888 +#ifdef Q23_TL_EXPECTED_CXX14
889 template <class Exp, class F,
890 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
891 class Ret = decltype(detail::invoke(std::declval<F>(),
892 @@ -2266,8 +2266,8 @@ auto expected_map_impl(Exp &&exp, F &&f) -> expected<void, err_t<Exp>> {
893 }
894 #endif
895
896 -#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
897 - !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
898 +#if defined(Q23_TL_EXPECTED_CXX14) && !defined(Q23_TL_EXPECTED_GCC49) && \
899 + !defined(Q23_TL_EXPECTED_GCC54) && !defined(Q23_TL_EXPECTED_GCC55)
900 template <class Exp, class F,
901 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
902 class Ret = decltype(detail::invoke(std::declval<F>(),
903 @@ -2382,7 +2382,7 @@ auto map_error_impl(Exp &&exp, F &&f) -> expected<exp_t<Exp>, monostate> {
904 }
905 #endif
906
907 -#ifdef TL_EXPECTED_CXX14
908 +#ifdef Q23_TL_EXPECTED_CXX14
909 template <class Exp, class F,
910 class Ret = decltype(detail::invoke(std::declval<F>(),
911 std::declval<Exp>().error())),
912 --
913 2.25.1
914