• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Try operation macros
2 (C) 2017-2020 Niall Douglas <http://www.nedproductions.biz/> (20 commits)
3 File Created: July 2017
4 
5 
6 Boost Software License - Version 1.0 - August 17th, 2003
7 
8 Permission is hereby granted, free of charge, to any person or organization
9 obtaining a copy of the software and accompanying documentation covered by
10 this license (the "Software") to use, reproduce, display, distribute,
11 execute, and transmit the Software, and to prepare derivative works of the
12 Software, and to permit third-parties to whom the Software is furnished to
13 do so, all subject to the following:
14 
15 The copyright notices in the Software and this entire statement, including
16 the above license grant, this restriction and the following disclaimer,
17 must be included in all copies of the Software, in whole or in part, and
18 all derivative works of the Software, unless such copies or derivative
19 works are solely in the form of machine-executable object code generated by
20 a source language processor.
21 
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
25 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
26 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
27 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 DEALINGS IN THE SOFTWARE.
29 */
30 
31 #ifndef BOOST_OUTCOME_TRY_HPP
32 #define BOOST_OUTCOME_TRY_HPP
33 
34 #include "success_failure.hpp"
35 
36 BOOST_OUTCOME_V2_NAMESPACE_BEGIN
37 
38 namespace detail
39 {
40   struct has_value_overload
41   {
42   };
43   struct as_failure_overload
44   {
45   };
46   struct assume_error_overload
47   {
48   };
49   struct error_overload
50   {
51   };
52   struct assume_value_overload
53   {
54   };
55   struct value_overload
56   {
57   };
58   //#ifdef __APPLE__
59   //  BOOST_OUTCOME_TEMPLATE(class T, class R = decltype(std::declval<T>()._xcode_workaround_as_failure()))
60   //#else
BOOST_OUTCOME_TEMPLATE(class T,class R=decltype(std::declval<T> ().as_failure ()) )61   BOOST_OUTCOME_TEMPLATE(class T, class R = decltype(std::declval<T>().as_failure()))
62   //#endif
63   BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TPRED(BOOST_OUTCOME_V2_NAMESPACE::is_failure_type<R>))
64   constexpr inline bool has_as_failure(int /*unused */) { return true; }
has_as_failure(...)65   template <class T> constexpr inline bool has_as_failure(...) { return false; }
66   BOOST_OUTCOME_TEMPLATE(class T)
67   BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TEXPR(std::declval<T>().assume_error()))
has_assume_error(int)68   constexpr inline bool has_assume_error(int /*unused */) { return true; }
has_assume_error(...)69   template <class T> constexpr inline bool has_assume_error(...) { return false; }
70   BOOST_OUTCOME_TEMPLATE(class T)
71   BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TEXPR(std::declval<T>().error()))
has_error(int)72   constexpr inline bool has_error(int /*unused */) { return true; }
has_error(...)73   template <class T> constexpr inline bool has_error(...) { return false; }
74   BOOST_OUTCOME_TEMPLATE(class T)
75   BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TEXPR(std::declval<T>().assume_value()))
has_assume_value(int)76   constexpr inline bool has_assume_value(int /*unused */) { return true; }
has_assume_value(...)77   template <class T> constexpr inline bool has_assume_value(...) { return false; }
78   BOOST_OUTCOME_TEMPLATE(class T)
79   BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TEXPR(std::declval<T>().value()))
has_value(int)80   constexpr inline bool has_value(int /*unused */) { return true; }
has_value(...)81   template <class T> constexpr inline bool has_value(...) { return false; }
82 }  // namespace detail
83 
84 /*! AWAITING HUGO JSON CONVERSION TOOL
85 SIGNATURE NOT RECOGNISED
86 */
87 BOOST_OUTCOME_TEMPLATE(class T)
88 BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TEXPR(std::declval<T>().has_value()))
try_operation_has_value(T && v,detail::has_value_overload={})89 constexpr inline bool try_operation_has_value(T &&v, detail::has_value_overload = {})
90 {
91   return v.has_value();
92 }
93 
94 /*! AWAITING HUGO JSON CONVERSION TOOL
95 SIGNATURE NOT RECOGNISED
96 */
97 BOOST_OUTCOME_TEMPLATE(class T)
98 BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TPRED(detail::has_as_failure<T>(5)))
try_operation_return_as(T && v,detail::as_failure_overload={})99 constexpr inline decltype(auto) try_operation_return_as(T &&v, detail::as_failure_overload = {})
100 {
101   return static_cast<T &&>(v).as_failure();
102 }
103 /*! AWAITING HUGO JSON CONVERSION TOOL
104 SIGNATURE NOT RECOGNISED
105 */
106 BOOST_OUTCOME_TEMPLATE(class T)
107 BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TPRED(!detail::has_as_failure<T>(5) && detail::has_assume_error<T>(5)))
try_operation_return_as(T && v,detail::assume_error_overload={})108 constexpr inline decltype(auto) try_operation_return_as(T &&v, detail::assume_error_overload = {})
109 {
110   return failure(static_cast<T &&>(v).assume_error());
111 }
112 /*! AWAITING HUGO JSON CONVERSION TOOL
113 SIGNATURE NOT RECOGNISED
114 */
115 BOOST_OUTCOME_TEMPLATE(class T)
116 BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TPRED(!detail::has_as_failure<T>(5) && !detail::has_assume_error<T>(5) && detail::has_error<T>(5)))
try_operation_return_as(T && v,detail::error_overload={})117 constexpr inline decltype(auto) try_operation_return_as(T &&v, detail::error_overload = {})
118 {
119   return failure(static_cast<T &&>(v).error());
120 }
121 
122 /*! AWAITING HUGO JSON CONVERSION TOOL
123 SIGNATURE NOT RECOGNISED
124 */
125 BOOST_OUTCOME_TEMPLATE(class T)
126 BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TPRED(detail::has_assume_value<T>(5)))
try_operation_extract_value(T && v,detail::assume_value_overload={})127 constexpr inline decltype(auto) try_operation_extract_value(T &&v, detail::assume_value_overload = {})
128 {
129   return static_cast<T &&>(v).assume_value();
130 }
131 /*! AWAITING HUGO JSON CONVERSION TOOL
132 SIGNATURE NOT RECOGNISED
133 */
134 BOOST_OUTCOME_TEMPLATE(class T)
135 BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TPRED(!detail::has_assume_value<T>(5) && detail::has_value<T>(5)))
try_operation_extract_value(T && v,detail::value_overload={})136 constexpr inline decltype(auto) try_operation_extract_value(T &&v, detail::value_overload = {})
137 {
138   return static_cast<T &&>(v).value();
139 }
140 
141 BOOST_OUTCOME_V2_NAMESPACE_END
142 
143 #if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 8
144 #pragma GCC diagnostic push
145 #pragma GCC diagnostic ignored "-Wparentheses"
146 #endif
147 
148 
149 #define BOOST_OUTCOME_TRY_GLUE2(x, y) x##y
150 #define BOOST_OUTCOME_TRY_GLUE(x, y) BOOST_OUTCOME_TRY_GLUE2(x, y)
151 #define BOOST_OUTCOME_TRY_UNIQUE_NAME BOOST_OUTCOME_TRY_GLUE(_outcome_try_unique_name_temporary, __COUNTER__)
152 
153 #define BOOST_OUTCOME_TRY_RETURN_ARG_COUNT(_1_, _2_, _3_, _4_, _5_, _6_, _7_, _8_, count, ...) count
154 #define BOOST_OUTCOME_TRY_EXPAND_ARGS(args) BOOST_OUTCOME_TRY_RETURN_ARG_COUNT args
155 #define BOOST_OUTCOME_TRY_COUNT_ARGS_MAX8(...) BOOST_OUTCOME_TRY_EXPAND_ARGS((__VA_ARGS__, 8, 7, 6, 5, 4, 3, 2, 1, 0))
156 #define BOOST_OUTCOME_TRY_OVERLOAD_MACRO2(name, count) name##count
157 #define BOOST_OUTCOME_TRY_OVERLOAD_MACRO1(name, count) BOOST_OUTCOME_TRY_OVERLOAD_MACRO2(name, count)
158 #define BOOST_OUTCOME_TRY_OVERLOAD_MACRO(name, count) BOOST_OUTCOME_TRY_OVERLOAD_MACRO1(name, count)
159 #define BOOST_OUTCOME_TRY_OVERLOAD_GLUE(x, y) x y
160 #define BOOST_OUTCOME_TRY_CALL_OVERLOAD(name, ...)                                                                                                                   \
161   BOOST_OUTCOME_TRY_OVERLOAD_GLUE(BOOST_OUTCOME_TRY_OVERLOAD_MACRO(name, BOOST_OUTCOME_TRY_COUNT_ARGS_MAX8(__VA_ARGS__)), (__VA_ARGS__))
162 
163 #ifndef BOOST_OUTCOME_TRY_LIKELY
164 #if defined(__clang__) || defined(__GNUC__)
165 #define BOOST_OUTCOME_TRY_LIKELY(expr) (__builtin_expect(!!(expr), true))
166 #else
167 #define BOOST_OUTCOME_TRY_LIKELY(expr) (expr)
168 #endif
169 #endif
170 
171 // Use if(!expr); else as some compilers assume else clauses are always unlikely
172 #define BOOST_OUTCOME_TRYV2_SUCCESS_LIKELY(unique, ...)                                                                                                              \
173   auto &&unique = (__VA_ARGS__);                                                                                                                               \
174   if(BOOST_OUTCOME_TRY_LIKELY(BOOST_OUTCOME_V2_NAMESPACE::try_operation_has_value(unique)))                                                                                \
175     ;                                                                                                                                                          \
176   else                                                                                                                                                         \
177     return BOOST_OUTCOME_V2_NAMESPACE::try_operation_return_as(static_cast<decltype(unique) &&>(unique))
178 #define BOOST_OUTCOME_TRY2_SUCCESS_LIKELY(unique, v, ...)                                                                                                            \
179   BOOST_OUTCOME_TRYV2_SUCCESS_LIKELY(unique, __VA_ARGS__);                                                                                                           \
180   v = BOOST_OUTCOME_V2_NAMESPACE::try_operation_extract_value(static_cast<decltype(unique) &&>(unique))
181 #define BOOST_OUTCOME_TRYV2_FAILURE_LIKELY(unique, ...)                                                                                                              \
182   auto &&unique = (__VA_ARGS__);                                                                                                                               \
183   if(BOOST_OUTCOME_TRY_LIKELY(!BOOST_OUTCOME_V2_NAMESPACE::try_operation_has_value(unique)))                                                                               \
184   return BOOST_OUTCOME_V2_NAMESPACE::try_operation_return_as(static_cast<decltype(unique) &&>(unique))
185 #define BOOST_OUTCOME_TRY2_FAILURE_LIKELY(unique, v, ...)                                                                                                            \
186   BOOST_OUTCOME_TRYV2_FAILURE_LIKELY(unique, __VA_ARGS__);                                                                                                           \
187   v = BOOST_OUTCOME_V2_NAMESPACE::try_operation_extract_value(static_cast<decltype(unique) &&>(unique))
188 
189 #define BOOST_OUTCOME_CO_TRYV2_SUCCESS_LIKELY(unique, ...)                                                                                                           \
190   auto &&unique = (__VA_ARGS__);                                                                                                                               \
191   if(BOOST_OUTCOME_TRY_LIKELY(BOOST_OUTCOME_V2_NAMESPACE::try_operation_has_value(unique)))                                                                                \
192     ;                                                                                                                                                          \
193   else                                                                                                                                                         \
194     co_return BOOST_OUTCOME_V2_NAMESPACE::try_operation_return_as(static_cast<decltype(unique) &&>(unique))
195 #define BOOST_OUTCOME_CO_TRY2_SUCCESS_LIKELY(unique, v, ...)                                                                                                         \
196   BOOST_OUTCOME_CO_TRYV2_SUCCESS_LIKELY(unique, __VA_ARGS__);                                                                                                        \
197   v = BOOST_OUTCOME_V2_NAMESPACE::try_operation_extract_value(static_cast<decltype(unique) &&>(unique))
198 #define BOOST_OUTCOME_CO_TRYV2_FAILURE_LIKELY(unique, ...)                                                                                                           \
199   auto &&unique = (__VA_ARGS__);                                                                                                                               \
200   if(BOOST_OUTCOME_TRY_LIKELY(!BOOST_OUTCOME_V2_NAMESPACE::try_operation_has_value(unique)))                                                                               \
201   co_return BOOST_OUTCOME_V2_NAMESPACE::try_operation_return_as(static_cast<decltype(unique) &&>(unique))
202 #define BOOST_OUTCOME_CO_TRY2_FAILURE_LIKELY(unique, v, ...)                                                                                                         \
203   BOOST_OUTCOME_CO_TRYV2_FAILURE_LIKELY(unique, __VA_ARGS__);                                                                                                        \
204   v = BOOST_OUTCOME_V2_NAMESPACE::try_operation_extract_value(static_cast<decltype(unique) &&>(unique))
205 
206 /*! AWAITING HUGO JSON CONVERSION TOOL
207 SIGNATURE NOT RECOGNISED
208 */
209 #define BOOST_OUTCOME_TRYV(...) BOOST_OUTCOME_TRYV2_SUCCESS_LIKELY(BOOST_OUTCOME_TRY_UNIQUE_NAME, __VA_ARGS__)
210 /*! AWAITING HUGO JSON CONVERSION TOOL
211 SIGNATURE NOT RECOGNISED
212 */
213 #define BOOST_OUTCOME_TRYV_FAILURE_LIKELY(...) BOOST_OUTCOME_TRYV2_FAILURE_LIKELY(BOOST_OUTCOME_TRY_UNIQUE_NAME, __VA_ARGS__)
214 
215 /*! AWAITING HUGO JSON CONVERSION TOOL
216 SIGNATURE NOT RECOGNISED
217 */
218 #define BOOST_OUTCOME_CO_TRYV(...) BOOST_OUTCOME_CO_TRYV2_SUCCESS_LIKELY(BOOST_OUTCOME_TRY_UNIQUE_NAME, __VA_ARGS__)
219 /*! AWAITING HUGO JSON CONVERSION TOOL
220 SIGNATURE NOT RECOGNISED
221 */
222 #define BOOST_OUTCOME_CO_TRYV_FAILURE_LIKELY(...) BOOST_OUTCOME_CO_TRYV2_FAILURE_LIKELY(BOOST_OUTCOME_TRY_UNIQUE_NAME, __VA_ARGS__)
223 
224 #if defined(__GNUC__) || defined(__clang__)
225 
226 #define BOOST_OUTCOME_TRYX2(unique, retstmt, ...)                                                                                                                    \
227   ({                                                                                                                                                           \
228     auto &&unique = (__VA_ARGS__);                                                                                                                             \
229     if(BOOST_OUTCOME_TRY_LIKELY(BOOST_OUTCOME_V2_NAMESPACE::try_operation_has_value(unique)))                                                                              \
230       ;                                                                                                                                                        \
231     else                                                                                                                                                       \
232       retstmt BOOST_OUTCOME_V2_NAMESPACE::try_operation_return_as(static_cast<decltype(unique) &&>(unique));                                                         \
233     BOOST_OUTCOME_V2_NAMESPACE::try_operation_extract_value(static_cast<decltype(unique) &&>(unique));                                                               \
234   })
235 
236 /*! AWAITING HUGO JSON CONVERSION TOOL
237 SIGNATURE NOT RECOGNISED
238 */
239 #define BOOST_OUTCOME_TRYX(...) BOOST_OUTCOME_TRYX2(BOOST_OUTCOME_TRY_UNIQUE_NAME, return, __VA_ARGS__)
240 
241 /*! AWAITING HUGO JSON CONVERSION TOOL
242 SIGNATURE NOT RECOGNISED
243 */
244 #define BOOST_OUTCOME_CO_TRYX(...) BOOST_OUTCOME_TRYX2(BOOST_OUTCOME_TRY_UNIQUE_NAME, co_return, __VA_ARGS__)
245 #endif
246 
247 /*! AWAITING HUGO JSON CONVERSION TOOL
248 SIGNATURE NOT RECOGNISED
249 */
250 #define BOOST_OUTCOME_TRYA(v, ...) BOOST_OUTCOME_TRY2_SUCCESS_LIKELY(BOOST_OUTCOME_TRY_UNIQUE_NAME, auto &&v, __VA_ARGS__)
251 /*! AWAITING HUGO JSON CONVERSION TOOL
252 SIGNATURE NOT RECOGNISED
253 */
254 #define BOOST_OUTCOME_TRYA_FAILURE_LIKELY(v, ...) BOOST_OUTCOME_TRY2_FAILURE_LIKELY(BOOST_OUTCOME_TRY_UNIQUE_NAME, auto &&v, __VA_ARGS__)
255 
256 /*! AWAITING HUGO JSON CONVERSION TOOL
257 SIGNATURE NOT RECOGNISED
258 */
259 #define BOOST_OUTCOME_CO_TRYA(v, ...) BOOST_OUTCOME_CO_TRY2_SUCCESS_LIKELY(BOOST_OUTCOME_TRY_UNIQUE_NAME, auto &&v, __VA_ARGS__)
260 /*! AWAITING HUGO JSON CONVERSION TOOL
261 SIGNATURE NOT RECOGNISED
262 */
263 #define BOOST_OUTCOME_CO_TRYA_FAILURE_LIKELY(v, ...) BOOST_OUTCOME_CO_TRY2_FAILURE_LIKELY(BOOST_OUTCOME_TRY_UNIQUE_NAME, auto &&v, __VA_ARGS__)
264 
265 
266 #define BOOST_OUTCOME_TRY_INVOKE_TRY8(a, b, c, d, e, f, g, h) BOOST_OUTCOME_TRYA(a, b, c, d, e, f, g, h)
267 #define BOOST_OUTCOME_TRY_INVOKE_TRY7(a, b, c, d, e, f, g) BOOST_OUTCOME_TRYA(a, b, c, d, e, f, g)
268 #define BOOST_OUTCOME_TRY_INVOKE_TRY6(a, b, c, d, e, f) BOOST_OUTCOME_TRYA(a, b, c, d, e, f)
269 #define BOOST_OUTCOME_TRY_INVOKE_TRY5(a, b, c, d, e) BOOST_OUTCOME_TRYA(a, b, c, d, e)
270 #define BOOST_OUTCOME_TRY_INVOKE_TRY4(a, b, c, d) BOOST_OUTCOME_TRYA(a, b, c, d)
271 #define BOOST_OUTCOME_TRY_INVOKE_TRY3(a, b, c) BOOST_OUTCOME_TRYA(a, b, c)
272 #define BOOST_OUTCOME_TRY_INVOKE_TRY2(a, b) BOOST_OUTCOME_TRYA(a, b)
273 #define BOOST_OUTCOME_TRY_INVOKE_TRY1(a) BOOST_OUTCOME_TRYV(a)
274 
275 /*! AWAITING HUGO JSON CONVERSION TOOL
276 SIGNATURE NOT RECOGNISED
277 */
278 #define BOOST_OUTCOME_TRY(...) BOOST_OUTCOME_TRY_CALL_OVERLOAD(BOOST_OUTCOME_TRY_INVOKE_TRY, __VA_ARGS__)
279 
280 #define BOOST_OUTCOME_TRY_FAILURE_LIKELY_INVOKE_TRY8(a, b, c, d, e, f, g, h) BOOST_OUTCOME_TRYA_FAILURE_LIKELY(a, b, c, d, e, f, g, h)
281 #define BOOST_OUTCOME_TRY_FAILURE_LIKELY_INVOKE_TRY7(a, b, c, d, e, f, g) BOOST_OUTCOME_TRYA_FAILURE_LIKELY(a, b, c, d, e, f, g)
282 #define BOOST_OUTCOME_TRY_FAILURE_LIKELY_INVOKE_TRY6(a, b, c, d, e, f) BOOST_OUTCOME_TRYA_FAILURE_LIKELY(a, b, c, d, e, f)
283 #define BOOST_OUTCOME_TRY_FAILURE_LIKELY_INVOKE_TRY5(a, b, c, d, e) BOOST_OUTCOME_TRYA_FAILURE_LIKELY(a, b, c, d, e)
284 #define BOOST_OUTCOME_TRY_FAILURE_LIKELY_INVOKE_TRY4(a, b, c, d) BOOST_OUTCOME_TRYA_FAILURE_LIKELY(a, b, c, d)
285 #define BOOST_OUTCOME_TRY_FAILURE_LIKELY_INVOKE_TRY3(a, b, c) BOOST_OUTCOME_TRYA_FAILURE_LIKELY(a, b, c)
286 #define BOOST_OUTCOME_TRY_FAILURE_LIKELY_INVOKE_TRY2(a, b) BOOST_OUTCOME_TRYA_FAILURE_LIKELY(a, b)
287 #define BOOST_OUTCOME_TRY_FAILURE_LIKELY_INVOKE_TRY1(a) BOOST_OUTCOME_TRYV_FAILURE_LIKELY(a)
288 /*! AWAITING HUGO JSON CONVERSION TOOL
289 SIGNATURE NOT RECOGNISED
290 */
291 #define BOOST_OUTCOME_TRY_FAILURE_LIKELY(...) BOOST_OUTCOME_TRY_CALL_OVERLOAD(BOOST_OUTCOME_TRY_FAILURE_LIKELY_INVOKE_TRY, __VA_ARGS__)
292 
293 #define BOOST_OUTCOME_CO_TRY_INVOKE_TRY8(a, b, c, d, e, f, g, h) BOOST_OUTCOME_CO_TRYA(a, b, c, d, e, f, g, h)
294 #define BOOST_OUTCOME_CO_TRY_INVOKE_TRY7(a, b, c, d, e, f, g) BOOST_OUTCOME_CO_TRYA(a, b, c, d, e, f, g)
295 #define BOOST_OUTCOME_CO_TRY_INVOKE_TRY6(a, b, c, d, e, f) BOOST_OUTCOME_CO_TRYA(a, b, c, d, e, f)
296 #define BOOST_OUTCOME_CO_TRY_INVOKE_TRY5(a, b, c, d, e) BOOST_OUTCOME_CO_TRYA(a, b, c, d, e)
297 #define BOOST_OUTCOME_CO_TRY_INVOKE_TRY4(a, b, c, d) BOOST_OUTCOME_CO_TRYA(a, b, c, d)
298 #define BOOST_OUTCOME_CO_TRY_INVOKE_TRY3(a, b, c) BOOST_OUTCOME_CO_TRYA(a, b, c)
299 #define BOOST_OUTCOME_CO_TRY_INVOKE_TRY2(a, b) BOOST_OUTCOME_CO_TRYA(a, b)
300 #define BOOST_OUTCOME_CO_TRY_INVOKE_TRY1(a) BOOST_OUTCOME_CO_TRYV(a)
301 /*! AWAITING HUGO JSON CONVERSION TOOL
302 SIGNATURE NOT RECOGNISED
303 */
304 #define BOOST_OUTCOME_CO_TRY(...) BOOST_OUTCOME_TRY_CALL_OVERLOAD(BOOST_OUTCOME_CO_TRY_INVOKE_TRY, __VA_ARGS__)
305 
306 /*! AWAITING HUGO JSON CONVERSION TOOL
307 SIGNATURE NOT RECOGNISED
308 */
309 #define BOOST_OUTCOME_TRY(...) BOOST_OUTCOME_TRY_CALL_OVERLOAD(BOOST_OUTCOME_TRY_INVOKE_TRY, __VA_ARGS__)
310 
311 #define BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY_INVOKE_TRY8(a, b, c, d, e, f, g, h) BOOST_OUTCOME_CO_TRYA_FAILURE_LIKELY(a, b, c, d, e, f, g, h)
312 #define BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY_INVOKE_TRY7(a, b, c, d, e, f, g) BOOST_OUTCOME_CO_TRYA_FAILURE_LIKELY(a, b, c, d, e, f, g)
313 #define BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY_INVOKE_TRY6(a, b, c, d, e, f) BOOST_OUTCOME_CO_TRYA_FAILURE_LIKELY(a, b, c, d, e, f)
314 #define BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY_INVOKE_TRY5(a, b, c, d, e) BOOST_OUTCOME_CO_TRYA_FAILURE_LIKELY(a, b, c, d, e)
315 #define BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY_INVOKE_TRY4(a, b, c, d) BOOST_OUTCOME_CO_TRYA_FAILURE_LIKELY(a, b, c, d)
316 #define BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY_INVOKE_TRY3(a, b, c) BOOST_OUTCOME_CO_TRYA_FAILURE_LIKELY(a, b, c)
317 #define BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY_INVOKE_TRY2(a, b) BOOST_OUTCOME_CO_TRYA_FAILURE_LIKELY(a, b)
318 #define BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY_INVOKE_TRY1(a) BOOST_OUTCOME_CO_TRYV_FAILURE_LIKELY(a)
319 /*! AWAITING HUGO JSON CONVERSION TOOL
320 SIGNATURE NOT RECOGNISED
321 */
322 #define BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY(...) BOOST_OUTCOME_TRY_CALL_OVERLOAD(BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY_INVOKE_TRY, __VA_ARGS__)
323 
324 #if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 8
325 #pragma GCC diagnostic pop
326 #endif
327 
328 #endif
329